public class PrintWriterLog extends Log
localTrace| Constructor and Description |
|---|
PrintWriterLog(String name,
PrintWriter writer) |
| Modifier and Type | Method and Description |
|---|---|
void |
debug(Object message)
Log a message with debug log level.
|
void |
debug(Object message,
Throwable t)
Log an error with debug log level.
|
void |
error(Object message)
Log a message with error log level.
|
void |
error(Object message,
Throwable t)
Log an error with error log level.
|
void |
fatal(Object message)
Log a message with fatal log level.
|
void |
fatal(Object message,
Throwable t)
Log an error with fatal log level.
|
Log.LEVEL |
getLevel() |
PrintWriter |
getWriter() |
void |
info(Object message)
Log a message with info log level.
|
void |
info(Object message,
Throwable t)
Log an error with info log level.
|
boolean |
isDebugEnabled()
Is debug logging currently enabled?
|
boolean |
isErrorEnabled()
Is error logging currently enabled?
|
boolean |
isFatalEnabled()
Is fatal logging currently enabled?
|
boolean |
isInfoEnabled()
Is info logging currently enabled?
|
boolean |
isTraceEnabled()
Is trace logging currently enabled?
|
boolean |
isTraces() |
boolean |
isWarnEnabled()
Is warn logging currently enabled?
|
String |
printTime() |
void |
setLevel(Log.LEVEL level) |
void |
setTraces(boolean traces) |
void |
trace(Object message)
Log a message with trace log level.
|
void |
trace(Object message,
Throwable t)
Log an error with trace log level.
|
void |
warn(Object message)
Log a message with warn log level.
|
void |
warn(Object message,
Throwable t)
Log an error with warn log level.
|
public PrintWriterLog(String name, PrintWriter writer)
public void debug(Object message)
LogLog a message with debug log level.
public void debug(Object message, Throwable t)
LogLog an error with debug log level.
public void error(Object message)
LogLog a message with error log level.
public void error(Object message, Throwable t)
LogLog an error with error log level.
public void fatal(Object message)
LogLog a message with fatal log level.
public void fatal(Object message, Throwable t)
LogLog an error with fatal log level.
public void info(Object message)
LogLog a message with info log level.
public void info(Object message, Throwable t)
LogLog an error with info log level.
public boolean isDebugEnabled()
LogIs debug logging currently enabled?
Call this method to prevent having to perform expensive operations
(for example, String concatenation)
when the log level is more than debug.
isDebugEnabled in class Logpublic boolean isErrorEnabled()
LogIs error logging currently enabled?
Call this method to prevent having to perform expensive operations
(for example, String concatenation)
when the log level is more than error.
isErrorEnabled in class Logpublic boolean isFatalEnabled()
LogIs fatal logging currently enabled?
Call this method to prevent having to perform expensive operations
(for example, String concatenation)
when the log level is more than fatal.
isFatalEnabled in class Logpublic boolean isInfoEnabled()
LogIs info logging currently enabled?
Call this method to prevent having to perform expensive operations
(for example, String concatenation)
when the log level is more than info.
isInfoEnabled in class Logpublic boolean isTraceEnabled()
LogIs trace logging currently enabled?
Call this method to prevent having to perform expensive operations
(for example, String concatenation)
when the log level is more than trace.
isTraceEnabled in class Logpublic boolean isWarnEnabled()
LogIs warn logging currently enabled?
Call this method to prevent having to perform expensive operations
(for example, String concatenation)
when the log level is more than warn.
isWarnEnabled in class Logpublic void trace(Object message)
LogLog a message with trace log level.
public void trace(Object message, Throwable t)
LogLog an error with trace log level.
public void warn(Object message)
LogLog a message with warn log level.
public void warn(Object message, Throwable t)
LogLog an error with warn log level.
public String printTime()
public Log.LEVEL getLevel()
public void setLevel(Log.LEVEL level)
public boolean isTraces()
public void setTraces(boolean traces)
public PrintWriter getWriter()
Copyright © 2014. All rights reserved.