|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Logger
A Logger object presents a "trace" of an execution, eg, for debugging. All methods here have a version with a "mask" and one without. The masked version checks that the mode agrees with the mask (mode & mask != 0) and then runs the other operation. Otherwise it does nothing and returns a null logger object. The non-mask version performs the operation if the last given mask agrees. See also the class NullLogger, where many of these methods are defined: applications typically subclass NullLogger rather than implementing this interface directly. Copyright Richard Kaye 2007-8 for GLOSS, http://gloss.bham.ac.uk Usage permitted according to the GPL. No waranty.
Field Summary | |
---|---|
static int |
LOG_ACTIONS
|
static int |
LOG_ALL
|
static int |
LOG_ERRORS
|
static int |
LOG_FILES
|
static int |
LOG_INPUT
|
static int |
LOG_MESSAGES
|
static int |
LOG_MODES
|
static int |
LOG_NONE
|
static int |
LOG_NORMAL
|
static int |
LOG_OUTPUT
|
static int |
LOG_PARAMETERS
|
static int |
LOG_PROCESSES
|
Method Summary | |
---|---|
Logger |
attribute(int mask,
java.lang.String name,
boolean value)
add attribute to an opened tag |
Logger |
attribute(int mask,
java.lang.String name,
int value)
add attribute to an opened tag |
Logger |
attribute(int mask,
java.lang.String name,
java.lang.String value)
add attribute to an opened tag |
Logger |
attribute(java.lang.String name,
boolean value)
add attribute to an opened tag |
Logger |
attribute(java.lang.String name,
int value)
add attribute to an opened tag |
Logger |
attribute(java.lang.String name,
java.lang.String value)
add attribute to an opened tag |
Logger |
closeelement()
closes the element line |
Logger |
closeelement(int mask)
closes the element line |
Logger |
closeelement(int mask,
java.lang.String name)
closes the element line, checking correct name |
Logger |
closeelement(java.lang.String name)
closes the element line, checking correct name |
Logger |
closetag()
close the tag |
Logger |
closetag(int mask)
close the tag |
Logger |
cr()
prints a cr and indentation |
Logger |
cr(int mask)
prints a cr and indentation |
Logger |
element(int mask,
java.lang.String name)
opens a log line with a XML tag "name" |
Logger |
element(java.lang.String name)
opens a log line with a XML tag "name" |
int |
mode()
returns the mode of this logger |
Logger |
print(int mask,
java.lang.String name)
prints text to output, with indentation if required |
Logger |
print(java.lang.String name)
prints text to output, with indentation if required |
Logger |
println(int mask,
java.lang.String name)
prints text to output, with indentation if required |
Logger |
println(java.lang.String name)
prints text to output, with indentation if required |
Logger |
thisLogger()
returns this logger |
Field Detail |
---|
static final int LOG_NONE
static final int LOG_MODES
static final int LOG_PARAMETERS
static final int LOG_INPUT
static final int LOG_OUTPUT
static final int LOG_ERRORS
static final int LOG_PROCESSES
static final int LOG_MESSAGES
static final int LOG_FILES
static final int LOG_ACTIONS
static final int LOG_ALL
static final int LOG_NORMAL
Method Detail |
---|
int mode()
Logger thisLogger()
Logger element(int mask, java.lang.String name)
Logger element(java.lang.String name)
Logger print(int mask, java.lang.String name)
Logger print(java.lang.String name)
Logger println(int mask, java.lang.String name)
Logger println(java.lang.String name)
Logger cr(int mask)
Logger cr()
Logger closeelement(int mask)
Logger closeelement()
Logger closeelement(int mask, java.lang.String name)
Logger closeelement(java.lang.String name)
Logger closetag(int mask)
Logger closetag()
Logger attribute(int mask, java.lang.String name, java.lang.String value)
Logger attribute(java.lang.String name, java.lang.String value)
Logger attribute(int mask, java.lang.String name, boolean value)
Logger attribute(java.lang.String name, boolean value)
Logger attribute(int mask, java.lang.String name, int value)
Logger attribute(java.lang.String name, int value)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |