logging

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: Apache-2.0, MPL-2.0 Imports: 5 Imported by: 0

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

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