Package org.h2.message
Interface TraceWriter
-
- All Known Implementing Classes:
TraceSystem,TraceWriterAdapter
interface TraceWriterThe backend of the trace system must implement this interface. Two implementations are supported: the (default) native trace writer implementation that can write to a file and to system out, and an adapter that uses SLF4J (Simple Logging Facade for Java).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisEnabled(int level)Check the given trace / log level is enabled.voidsetName(java.lang.String name)Set the name of the database or trace object.voidwrite(int level, int moduleId, java.lang.String s, java.lang.Throwable t)Write a message.voidwrite(int level, java.lang.String module, java.lang.String s, java.lang.Throwable t)Write a message.
-
-
-
Method Detail
-
setName
void setName(java.lang.String name)
Set the name of the database or trace object.- Parameters:
name- the new name
-
write
void write(int level, java.lang.String module, java.lang.String s, java.lang.Throwable t)Write a message.- Parameters:
level- the trace levelmodule- the name of the modules- the messaget- the exception (may be null)
-
write
void write(int level, int moduleId, java.lang.String s, java.lang.Throwable t)Write a message.- Parameters:
level- the trace levelmoduleId- the id of the modules- the messaget- the exception (may be null)
-
isEnabled
boolean isEnabled(int level)
Check the given trace / log level is enabled.- Parameters:
level- the level- Returns:
- true if the level is enabled
-
-