public class StandardLogger extends Logger
| Constructor and Description |
|---|
StandardLogger() |
StandardLogger(File fileName) |
StandardLogger(PrintStream stream) |
| Modifier and Type | Method and Description |
|---|---|
StreamResult |
asStreamResult()
Get a JAXP Result object allowing serialized XML to be written to this Logger
|
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(String message,
int severity)
Output a message with a specified severity.
|
void |
setPrintStream(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(PrintStream stream)
public StandardLogger(File fileName) throws FileNotFoundException
FileNotFoundExceptionpublic void setPrintStream(PrintStream stream)
stream - the stream to which messages will be written. Defaults to System.errpublic 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 StreamResult asStreamResult()
asStreamResult in class Loggerpublic void println(String message, int severity)
println in class Loggermessage - The message to be outputseverity - The severity: one of Logger.INFO, Logger.WARNING, Logger.ERROR,
Logger.DISASTERCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.