Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
expect object ConsoleLogger : Logger

Logger for the console, taking advantage of available features such as stderr or js console levels.

actual object ConsoleLogger : Logger

Console logger for JS.

actual object ConsoleLogger : Logger

Logger for System.out and System.err.

Link copied to clipboard

Constant tag generator, for when performance is more important than useful implicit tags.

Link copied to clipboard

Implementation of Logger which dispatches calls to consumer Loggers.

Link copied to clipboard

Marker interface to skip a class in the stack trace for the default TagGenerator on JVM. On other targets, this interface does nothing.

Link copied to clipboard
interface Key<T : Any>

Marker interface to strongly type metadata with its key. Proper usage is to create objects or enum classes when implementing this type.

Link copied to clipboard
annotation class KhronicleInternal

Marks a class as internal to Khronicle. These APIs are left public so they may be used by other modules, but should not be used outside (by consumers) of Khronicle.

Link copied to clipboard

Global logging object. To receive logs, call dispatcher.install.

Link copied to clipboard
fun interface LogFilter
Link copied to clipboard

Classes which implement Logger can write logs.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Alternative to ConsoleLogger that does not take advantage of extra available features.

Link copied to clipboard
sealed interface ReadMetadata

Additional data associated with a log. It's important that Logger instances do NOT hold onto references to ReadMetadata arguments after the function returns. If a ReadMetadata reference must be kept after function return, create a copy.

Link copied to clipboard

Standardized metadata for data sensitivity levels.

Link copied to clipboard
abstract class SimpleLogger : Logger

Simplified Logger which passes all logs through a single log function that accepts an additional LogLevel argument. This is particularly useful when a logging backend does not have separate function calls for each log level.

Link copied to clipboard
interface TagGenerator

Creates tag strings for implicitly-tagged Log calls.

Link copied to clipboard
sealed interface WriteMetadata

Additional data associated with a log. It's important that Log calls do NOT hold onto references to WriteMetadata arguments after the lambda returns.

Functions

Link copied to clipboard
fun Logger.dynamic(level: LogLevel, tag: String, message: String, metadata: ReadMetadata, throwable: Throwable?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard