Package io.permazen.jsck
Interface JsckLogger
public interface JsckLogger
Logging callback interface used during a
Jsck
key/value database consistency inspection.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Log a high-detail message.void
Log a low-detail (informational) message.boolean
Determine whether detailed logging should be performed.static JsckLogger
static JsckLogger
Create an instance that wraps the givenLogger
.
-
Method Details
-
info
Log a low-detail (informational) message.- Parameters:
format
-String.format()
format stringargs
- format arguments
-
detail
Log a high-detail message.- Parameters:
format
-String.format()
format stringargs
- format arguments
-
isDetailEnabled
boolean isDetailEnabled()Determine whether detailed logging should be performed.When this returns true, detailed logging is delivered to
detail()
, otherwise it is suppressed.- Returns:
- true if detailed logging should be performed
-
wrap
- Parameters:
logger
- destination for log messages- Returns:
JsckLogger
that logs tologger
- Throws:
IllegalArgumentException
- iflogger
is null
-
wrap
Create an instance that wraps the givenLogger
.The returned instance logs
info()
messages atinfoLevel
and anddetail()
messages to atdetailLevel
.- Parameters:
logger
- destination for log messagesinfoLevel
- log level forinfo()
messages, or null to suppress info messagesdetailLevel
- log level fordetail()
messages, or null to suppress detail messages- Returns:
JsckLogger
that logs tologger
- Throws:
IllegalArgumentException
- iflogger
is null
-