public class Slf4jAdapter extends Object implements PersistitLogger
org.slf4j.Logger instance for Persistit logging. Code
to enable default logging through Slf4j is shown here:
Logger log = ... instance of org.slf4j.Logger ...
Persistit.setPersistitLogger(new Slf4jAdapter(logger));
| Constructor and Description |
|---|
Slf4jAdapter(org.slf4j.Logger logger)
Constructs a wrapped Slf4j Logger.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Called when Persistit stops using the log.
|
void |
flush()
Flush pending ouput
|
boolean |
isLoggable(PersistitLevel level)
Overrides
isLoggable to allow control by the wrapped
Logger. |
void |
log(PersistitLevel level,
String message)
Writes a log message generated by Persistit to the wrapped
Logger. |
void |
open()
Called when Persistit starts using the log.
|
public Slf4jAdapter(org.slf4j.Logger logger)
logger - A Logger to which Persistit log messages will be
directed.public boolean isLoggable(PersistitLevel level)
isLoggable to allow control by the wrapped
Logger.isLoggable in interface PersistitLoggerlevel - The levelpublic void log(PersistitLevel level, String message)
Logger.log in interface PersistitLoggerlevel - The PersistitLevelmessage - The message to write to the log.public void open()
PersistitLoggeropen in interface PersistitLoggerpublic void close()
PersistitLoggerclose in interface PersistitLoggerpublic void flush()
PersistitLoggerflush in interface PersistitLoggerCopyright © 2025 Open Identity Platform Community. All rights reserved.