logging

package
v6.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Err

func Err(logger log.Logger, err error) error

Log an error with consistent error key and metadata and return the error passed in or an logging error enclosing the original error if there is a logging error

func InfoLogger

func InfoLogger(logger log.Logger) log.Logger

func InfoMsg

func InfoMsg(logger log.Logger, message string, keyvals ...interface{})

func Msg

func Msg(logger log.Logger, message string, keyvals ...interface{}) error

Record a structured log line with a message

func TraceLogger

func TraceLogger(logger log.Logger) log.Logger

func TraceMsg

func TraceMsg(logger log.Logger, message string, keyvals ...interface{})

Record structured Trace log line with a message

func TraceValuer

func TraceValuer() log.Valuer

func WithMetadata

func WithMetadata(logger log.Logger) log.Logger

func WithScope

func WithScope(logger log.Logger, scopeName string) log.Logger

Establish or extend the scope of this logger by appending scopeName to the Scope vector. Like With the logging scope is append only but can be used to provide parenthetical scopes by hanging on to the parent scope and using once the scope has been exited. The scope mechanism does is agnostic to the type of scope so can be used to identify certain segments of the call stack, a lexical scope, or any other nested scope.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL