public abstract class Logger
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
DISASTER |
static int |
ERROR |
static int |
INFO |
static int |
WARNING |
Constructor and Description |
---|
Logger() |
Modifier and Type | Method and Description |
---|---|
javax.xml.transform.stream.StreamResult |
asStreamResult()
Get a JAXP
StreamResult object allowing serialized XML to be written to the
output destination of this Logger. |
java.io.Writer |
asWriter()
Get a
Writer whose effect is to send each line of written output as
a separate INFO message to this Logger |
void |
close()
Close the logger, indicating that no further messages will be written
and that underlying streams should be closed, if they were created by the Logger
itself rather than by the user.
|
void |
disaster(java.lang.String message)
Log a message with level
DISASTER |
void |
error(java.lang.String message)
Log a message with level
ERROR |
void |
info(java.lang.String message)
Log a message with level
INFO |
boolean |
isUnicodeAware()
Ask whether the Logger is capable of handling the full Unicode character repertoire.
|
abstract void |
println(java.lang.String message,
int severity)
Log a message.
|
void |
setUnicodeAware(boolean aware)
Say whether the Logger is capable of handling the full Unicode character repertoire.
|
void |
warning(java.lang.String message)
Log a message with level
WARNING |
public static final int INFO
public static final int WARNING
public static final int ERROR
public static final int DISASTER
public void info(java.lang.String message)
INFO
message
- the message to be loggedpublic void warning(java.lang.String message)
WARNING
message
- the message to be loggedpublic void error(java.lang.String message)
ERROR
message
- the message to be loggedpublic void disaster(java.lang.String message)
DISASTER
message
- the message to be loggedpublic abstract void println(java.lang.String message, int severity)
public void close()
public boolean isUnicodeAware()
StandardErrorListener
will output special characters
using the notation C[xHHHH] where C is the character, and HHHH is its hexadecimal codepoint.public void setUnicodeAware(boolean aware)
aware
- true if the Logger can handle the full Unicode character repertoire. With the
default value (false), the StandardErrorListener
will output special characters
using the notation C[xHHHH] where C is the character, and HHHH is its hexadecimal codepoint.public java.io.Writer asWriter()
Writer
whose effect is to send each line of written output as
a separate INFO message to this LoggerWriter
public javax.xml.transform.stream.StreamResult asStreamResult()
StreamResult
object allowing serialized XML to be written to the
output destination of this Logger. The default implementation returns a
StreamResult
wrapping a custom Writer
that writes the supplied
text line by line using the println(String, int)
method.Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.