logging

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(level log.Level) log.Logger

NewLogger creates a new logger with the specified level and a formatter

func NewLoggerWithWriter

func NewLoggerWithWriter(w io.Writer, level log.Level) log.Logger

NewLoggerWithWriter creates a new logger with the specified level and writer and a formatter

Types

type LogFormat

type LogFormat int
const (
	UnspecifiedFormat LogFormat = iota
	StandardFormat
	JSONFormat
)

func ParseEnvLogFormat

func ParseEnvLogFormat() LogFormat

ParseEnvLogFormat parses the log format from an environment variable.

func ParseLogFormat

func ParseLogFormat(format string) (LogFormat, error)

ParseLogFormat parses the log format from the provided string.

func (LogFormat) String

func (l LogFormat) String() string

Stringer implementation

Jump to

Keyboard shortcuts

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