|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.message.TraceWriterAdapter
public class TraceWriterAdapter
This adapter sends log output to SLF4J. SLF4J supports multiple implementations such as Logback, Log4j, Jakarta Commons Logging (JCL), JDK 1.4 logging, x4juli, and Simple Log. To use SLF4J, you need to add the required jar files to the classpath, and set the trace level to 4 when opening a database:
jdbc:h2:˜/test;TRACE_LEVEL_FILE=4The logger name is 'h2database'.
Constructor Summary | |
---|---|
TraceWriterAdapter()
|
Method Summary | |
---|---|
boolean |
isEnabled(int level)
Check the given trace / log level is enabled. |
void |
setName(java.lang.String name)
Set the name of the database or trace object. |
void |
write(int level,
java.lang.String module,
java.lang.String s,
java.lang.Throwable t)
Write a message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TraceWriterAdapter()
Method Detail |
---|
public void setName(java.lang.String name)
name
- the new namepublic boolean isEnabled(int level)
level
- the level
public void write(int level, java.lang.String module, java.lang.String s, java.lang.Throwable t)
level
- the trace levelmodule
- the name of the modules
- the messaget
- the exception (may be null)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |