logging

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: MPL-2.0 Imports: 5 Imported by: 31

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewVaultLogger

func NewVaultLogger(level log.Level) log.Logger

NewVaultLogger creates a new logger with the specified level and a Vault formatter

func NewVaultLoggerWithWriter

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

NewVaultLoggerWithWriter creates a new logger with the specified level and writer and a Vault formatter

Types

type LogFormat added in v0.1.12

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

func ParseEnvLogFormat added in v0.1.12

func ParseEnvLogFormat() LogFormat

ParseEnvLogFormat parses the log format from an environment variable.

func ParseLogFormat added in v0.1.12

func ParseLogFormat(format string) (LogFormat, error)

ParseLogFormat parses the log format from the provided string.

func (LogFormat) String added in v0.1.12

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