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 PersistitLogger
level
- The level
public void log(PersistitLevel level, String message)
Logger
.log
in interface PersistitLogger
level
- The PersistitLevel
message
- The message to write to the log.public void open()
PersistitLogger
open
in interface PersistitLogger
public void close()
PersistitLogger
close
in interface PersistitLogger
public void flush()
PersistitLogger
flush
in interface PersistitLogger
Copyright © 2025 Open Identity Platform Community. All rights reserved.