public class Log extends Object
Constructor and Description |
---|
Log()
Creates a new Log that wraps a HoldingLogChute.
|
Log(LogChute chute)
Creates a new Log that wraps the specified LogChute.
|
Modifier and Type | Method and Description |
---|---|
void |
debug(Object message)
Log a debug message.
|
void |
debug(Object message,
Throwable t)
Log a debug message and accompanying Throwable.
|
void |
error(Object message)
Log an error message.
|
void |
error(Object message,
Throwable t)
Log an error message and accompanying Throwable.
|
static String |
formatFileString(Directive directive)
Creates a string that formats the template filename with line number
and column of the given Directive.
|
static String |
formatFileString(Info info)
Simply creates a string that formats the template filename with line number
and column.
|
static String |
formatFileString(Node node)
Creates a string that formats the template filename with line number
and column of the given Node.
|
static String |
formatFileString(String template,
int linenum,
int colnum)
Simply creates a string that formats the template filename with line number
and column.
|
protected LogChute |
getLogChute()
Returns the LogChute wrapped by this Log instance.
|
void |
info(Object message)
Log an info message.
|
void |
info(Object message,
Throwable t)
Log an info message and accompanying Throwable.
|
boolean |
isDebugEnabled()
Returns true if debug level messages will be printed by the LogChute.
|
boolean |
isErrorEnabled()
Returns true if error level messages will be printed by the LogChute.
|
boolean |
isInfoEnabled()
Returns true if info level messages will be printed by the LogChute.
|
boolean |
isTraceEnabled()
Returns true if trace level messages will be printed by the LogChute.
|
boolean |
isWarnEnabled()
Returns true if warn level messages will be printed by the LogChute.
|
protected void |
log(int level,
Object message) |
protected void |
log(int level,
Object message,
Throwable t) |
protected void |
setLogChute(LogChute chute)
Updates the LogChute wrapped by this Log instance.
|
void |
trace(Object message)
Log a trace message.
|
void |
trace(Object message,
Throwable t)
Log a trace message and accompanying Throwable.
|
void |
warn(Object message)
Log a warning message.
|
void |
warn(Object message,
Throwable t)
Log a warning message and accompanying Throwable.
|
public Log()
public Log(LogChute chute)
chute
- protected void setLogChute(LogChute chute)
chute
- The new value for the log chute.protected LogChute getLogChute()
protected void log(int level, Object message)
public boolean isTraceEnabled()
public void trace(Object message)
message
- public void trace(Object message, Throwable t)
message
- t
- public boolean isDebugEnabled()
public void debug(Object message)
message
- public void debug(Object message, Throwable t)
message
- t
- public boolean isInfoEnabled()
public void info(Object message)
message
- public void info(Object message, Throwable t)
message
- t
- public boolean isWarnEnabled()
public void warn(Object message)
message
- public void warn(Object message, Throwable t)
message
- t
- public boolean isErrorEnabled()
public void error(Object message)
message
- public void error(Object message, Throwable t)
message
- t
- public static final String formatFileString(Directive directive)
public static final String formatFileString(Node node)
public static final String formatFileString(Info info)
public static final String formatFileString(String template, int linenum, int colnum)
template
- File name of template, can be nulllinenum
- Line number within the filecolnum
- Column number withing the file at linenumCopyright © 2000–2018. All rights reserved.