public class StandardLogger extends Logger
Constructor and Description |
---|
StandardLogger() |
StandardLogger(java.io.File fileName) |
StandardLogger(java.io.PrintStream stream) |
Modifier and Type | Method and Description |
---|---|
javax.xml.transform.stream.StreamResult |
asStreamResult()
Get a JAXP Result object allowing serialized XML to be written to this Logger
|
java.io.PrintStream |
getPrintStream()
Get the output destination used for messages
|
int |
getThreshold()
Get the minimum threshold for the severity of messages to be output.
|
void |
println(java.lang.String message,
int severity)
Output a message with a specified severity.
|
void |
setPrintStream(java.io.PrintStream stream)
Set the output destination for messages
|
void |
setThreshold(int threshold)
Set the minimum threshold for the severity of messages to be output.
|
public StandardLogger()
public StandardLogger(java.io.PrintStream stream)
public StandardLogger(java.io.File fileName) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public void setPrintStream(java.io.PrintStream stream)
stream
- the stream to which messages will be written. Defaults to System.errpublic java.io.PrintStream getPrintStream()
public void setThreshold(int threshold)
Logger.INFO
. Messages whose severity is below this threshold will be ignoredthreshold
- the minimum severity of messages to be output.public int getThreshold()
Logger.INFO
. Messages whose severity is below this threshold will be ignoredpublic javax.xml.transform.stream.StreamResult asStreamResult()
asStreamResult
in class Logger
public void println(java.lang.String message, int severity)
println
in class Logger
message
- The message to be outputseverity
- The severity: one of Logger.INFO
, Logger.WARNING
, Logger.ERROR
,
Logger.DISASTER
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.