|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.opencms.boot.CmsLog
This class enables the OpenCms logging feature. Different logging channels are supported and can be (de)activated by the log settings in the proerty file.
| Constructor Summary | |
CmsLog(String identifier,
source.org.apache.java.util.Configurations confs)
The main constructor |
|
| Method Summary | |
void |
flush()
Writes any pending messages into the log media. |
boolean |
isActive()
Check if this log is active. |
boolean |
isActive(String channel)
Tells if the given channel is active. |
void |
log(String channel,
String message)
Prints the log message on the right channel. |
void |
log(String channel,
Throwable t)
Prints the error message and stack trace if channel enabled. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CmsLog(String identifier,
source.org.apache.java.util.Configurations confs)
| Method Detail |
public void flush()
flush in interface source.org.apache.java.io.Loggerpublic boolean isActive()
isActive in interface source.org.apache.java.io.Loggertrue the log is active, false otherwise.public boolean isActive(String channel)
isActive in interface source.org.apache.java.io.Loggerchannel - the channel to test.
true the given channel is active, false otherwise.
public void log(String channel,
String message)
A "channel" is a virtual log that may be enabled or disabled by setting the property "identifier".channel.???=true where ??? is the channel identifier that must be passed with the message. If a channel is not recognized or its property is set to false the message is not written.
log in interface source.org.apache.java.io.Loggerchannel - the channel to put the message on.
public void log(String channel,
Throwable t)
log in interface source.org.apache.java.io.Loggert - the error thrown.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||