Package org.h2.message

# Class TraceWriterAdapter

java.lang.Object
org.h2.message.TraceWriterAdapter

public class TraceWriterAdapter extends Object
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=4

The logger name is 'h2database'.

## Constructor Summary

Constructors
Constructor
Description
`TraceWriterAdapter()`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`isEnabled(int level)`
`void`
`setName(String name)`
`void`
`write(int level, int moduleId, String s, Throwable t)`
`void`
`write(int level, String module, String s, Throwable t)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### TraceWriterAdapter

public TraceWriterAdapter()

## Method Details

### setName

public void setName(String name)

### isEnabled

public boolean isEnabled(int level)

### write

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

### write

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