Top Description Methods
org.h2.message

pack-priv Interface TraceWriter

Known Direct Implementers
org.h2.message.TraceWriterAdapter, org.h2.message.TraceSystem

The 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

Modifier and TypeMethod and Description
public boolean

Returns:

true if the level is enabled
isEnabled
(int
the level
level
)

Check the given trace / log level is enabled.

public void
setName(String
the new name
name
)

Set the name of the database or trace object.

public void
write(int
the trace level
level
,
String
the name of the module
module
,
String
the message
s
,
Throwable
the exception (may be null)
t
)

Write a message.

public void
write(int
the trace level
level
,
int
the id of the module
moduleId
,
String
the message
s
,
Throwable
the exception (may be null)
t
)

Write a message.

Method Detail

isEnabledback to summary
public boolean isEnabled(int level)

Check the given trace / log level is enabled.

Parameters
level:int

the level

Returns:boolean

true if the level is enabled

setNameback to summary
public void setName(String name)

Set the name of the database or trace object.

Parameters
name:String

the new name

writeback to summary
public void write(int level, String module, String s, Throwable t)

Write a message.

Parameters
level:int

the trace level

module:String

the name of the module

s:String

the message

t:Throwable

the exception (may be null)

writeback to summary
public void write(int level, int moduleId, String s, Throwable t)

Write a message.

Parameters
level:int

the trace level

moduleId:int

the id of the module

s:String

the message

t:Throwable

the exception (may be null)