Back to godoc.org
github.com/hashicorp/vault/sdk / helper / logging

package logging

v0.1.13
Latest Go to latest
Published: Jul 25, 2019 | License: MPL-2.0 | Module: github.com/hashicorp/vault/sdk

Index

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
	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

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

Jump to identifier

Keyboard shortcuts

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