Package-level declarations

Rendering log events as JSON or plain text.

Types

Link copied to clipboard
typealias RenderString = (LogEvent) -> String

Functional type for rendering a LogEvent to a String.

Functions

Link copied to clipboard
Link copied to clipboard
fun compressLoggerName(name: String, width: Int = 20): String
Link copied to clipboard
Link copied to clipboard
fun Instant.graylogFormat(): String
Link copied to clipboard
fun green(str: String): String
Link copied to clipboard
fun grey(str: String): String
Link copied to clipboard
fun red(str: String): String
Link copied to clipboard

Right-align the string into a fixed-width space.

Link copied to clipboard

Serialize a map with string keys to JSON.

Link copied to clipboard
fun yellow(str: String): String

Properties

Link copied to clipboard

Render a level in colour using ANSI colour escapes.

Link copied to clipboard
val Instant.localString: String

Extension property for Kotlin Instant to render it in local time as two words.

Link copied to clipboard
val Instant.localTime: String

Only the local time component.

Link copied to clipboard

Implementation of RenderString like that for Log4J2 with ANSI colouring of level output to a console.

Link copied to clipboard

Render a LogEvent into CLEF compact JSON format.

Link copied to clipboard

Render a LogEvent into JSON in Elastic Common Schema for sending directly to an ELK stack.

Link copied to clipboard

Renders a LogEvent into GELF JSON format.

Link copied to clipboard

Simple implementation of RenderString for output to the standard output stream, mostly on one line.

Link copied to clipboard