public interface TraceInterface
Copyright: Copyright 2003-2014, Knowledge Science Group, University of Calgary. Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The Knowledge Science Group makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
Defines the basic functionality for theTrace
class.Modifier and Type | Method and Description |
---|---|
int |
addTraceTags(String tags)
Adds a comma-delimited list of trace tags to a string.
|
void |
clearAllTraceTags()
Turns off ALL the trace tags.
|
String |
getTraceTags() |
boolean |
isLoggingTag(String tag)
Determine if the specified trace tag spec will print, taking
into account the last digit appended on the tag if it's there.
|
String |
println(String tag,
String string)
Equivalent to
println(tag, string, null, 0) |
String |
println(String tag,
String string,
int flags)
Equivalent to
println(tag, string, null, flag) |
String |
println(String traceTag,
String txt,
Throwable ex)
Equivalent to
println(tag, string, ex, 0) |
String |
println(String traceTag,
String txt,
Throwable ex,
int flags)
This is the println method that defines all the other println methods.
|
int |
removeTraceTags(String tags)
Removes the tags in the comma-delimited streams specified in tags.
|
void |
setAllTraceTags()
Turns all ALL the trace tags.
|
int |
setTraceTags(String tags)
Works the same as addTraceTags, but removes all previous tags beforehand.
|
int addTraceTags(String tags)
tags
- a comma-delimited list of trace tagsint removeTraceTags(String tags)
tags
- The tags to be removed.setTraceTags(String)
int setTraceTags(String tags)
tags
- A command-delimited list of tags. White space is ignored.String getTraceTags()
boolean isLoggingTag(String tag)
tag
- String println(String tag, String string)
println(tag, string, null, 0)
traceTag
- This tag MUST be present in set of traceTags for anything to be printed/logged.txt
- The message to be printed/logged.println(String, String, Throwable, int)
String println(String tag, String string, int flags)
println(tag, string, null, flag)
traceTag
- This tag MUST be present in set of traceTags for anything to be printed/logged.txt
- The message to be printed/logged.flags
- The options flags; use bitwise disjunct ("|") to combine options - #OPT_SUPPRESS_AGENT_LOG
, #OPT_COPY_TO_SYSERR
, #OPT_COPY_TO_SYSOUT
, #OPT_FORCE_STACK_TRACE
, #OPT_INCLUDE_CODE_LINE_NUMBER
, #OPT_SUPPRESS_HEADER_ON_SYSOUT
, #OPT_SUPRESS_STACK_TRACE
.println(String, String, Throwable, int)
String println(String traceTag, String txt, Throwable ex)
println(tag, string, ex, 0)
traceTag
- This tag MUST be present in set of traceTags for anything to be printed/logged.txt
- The message to be printed/logged.ex
- If this is non-null, the stack trace will be appended to the messageprintln(String, String, Throwable, int)
String println(String traceTag, String txt, Throwable ex, int flags)
#OPT_INCLUDE_CODE_LINE_NUMBER
is in flags then so short string of ">"'s.
In any of these cases, the ">"'s is followed by the guess of the calling source file and line number.
#OPT_SUPRESS_STACK_TRACE
is not set, or #OPT_FORCE_STACK_TRACE
is set.
[* timestamp : agentName : tag : thread-name *]
traceTag
- This tag MUST be present in set of traceTags for anything to be printed/logged.txt
- The message to be printed/logged.ex
- If this is non-null, the stack trace will be appended to the messageflags
- The options flags; use bitwise disjunct ("|") to combine options - #OPT_SUPPRESS_AGENT_LOG
, #OPT_COPY_TO_SYSERR
, #OPT_COPY_TO_SYSOUT
, #OPT_FORCE_STACK_TRACE
, #OPT_INCLUDE_CODE_LINE_NUMBER
, #OPT_SUPPRESS_HEADER_ON_SYSOUT
, #OPT_SUPRESS_STACK_TRACE
.void setAllTraceTags()
void clearAllTraceTags()