Package com.apple.foundationdb.record.logging
Logging in the Record Layer
All logging is done using SLF4J, which should be compatible with whatever logging framework the client system uses.
All Logger
s have names starting with com.apple.foundationdb.record
.
Log messages of any complexity use KeyValueLogMessage
, which outputs in a standard key=value
format.
Most of the standard log message keys appear in LogMessageKeys
.
Since record operations are fundamentally asynchronous and makes extensive use of CompletableFuture
composition, log messages for a single operation will
often come from multiple thread pool threads. To allow these to be associated with a calling context in the log, the MDC
is used.
FDBDatabase.openContext()
takes an optional MDC map, which will be maintained for all work done by the FDBRecordContext
.
-
Class Summary Class Description CompletionExceptionLogHelper Helper class for helping with logging ofCompletionException
s.KeyValueLogMessage A formatter for log messages. -
Enum Summary Enum Description LogMessageKeys CommonKeyValueLogMessage
keys logged by the Record Layer core.TestLogMessageKeys CommonKeyValueLogMessage
keys logged by the Record Layer core. -
Exception Summary Exception Description CompletionExceptionLogHelper.IgnoredSuppressedExceptionCount A special "exception" to record the number of suppressed exceptions that were not recorded due to theCompletionExceptionLogHelper.maxSuppressedCount
.