Back to / helper / logging

package logging

Latest Go to latest
Published: Jul 25, 2019 | License: MPL-2.0 | Module:


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

type LogFormat

type LogFormat int
const (
	UnspecifiedFormat LogFormat = iota

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

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier