Categorygithub.com/ffromani/formatr
modulepackage
0.2.1
Repository: https://github.com/ffromani/formatr.git
Documentation: pkg.go.dev

# README

formatr

formatr is a log formatter derived from (and compatible with) go-logr/funcr which adds klog-like output formatting.

license

Apache v2, like go-logr

origin

imported from https://github.com/go-logr/logr.git @ 2ea8628b184c8ed00c5698d7798d30e49deb454d

# Packages

No description provided by the author

# Functions

NewFormatter constructs a Formatter which emits a JSON-like key=value format.
NewFormatterJSON constructs a Formatter which emits strict JSON.
NewFormatterKlog constructs a Formatter which emits a klog-like format.

# Constants

All considers all message classes.
Error only considers error messages.
Info only considers info messages.
None ignores all message classes.

# Structs

Caller represents the original call site for a log line, after considering logr.Logger.WithCallDepth and logr.Logger.WithCallStackHelper.
Formatter is an opaque struct which can be embedded in a LogSink implementation.
Options carries parameters which influence the way logs are generated.

# Type aliases

MessageClass indicates which category or categories of messages to consider.
PseudoStruct is a list of key-value pairs that gets logged as a struct.