Package-level declarations

Rendering log events as JSON or plain text.

Types

Link copied to clipboard
interface RenderString

Interface for rendering a LogEvent to a 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
Link copied to clipboard

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

Link copied to clipboard

Functions

Link copied to clipboard
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
fun renderHec(index: String? = null, sourceType: String? = null, source: String? = null): RenderString

Renders an event into JSON format for Splunk HTTP Event Collector.

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 shortenName(name: CharSequence, width: Int = DEFAULT_MAX_WIDTH): CharSequence

Shortens the given name if it exceeds the specified width.

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