logging

package
v0.0.0-...-43d0de1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FieldsFromEnv

func FieldsFromEnv(env []string) []zapcore.Field

FieldsFromEnv extracts log fields from environment variables. If an environment variable starts with LOG_FIELD_, the suffix is extracted and split on =. The first part is used for the name and the second for the value. For example, LOG_FIELD_foo=bar would result in a field named "foo" with the value "bar".

func Level

func Level() *zap.AtomicLevel

Level gets the current log level.

func Logger

func Logger() *zap.Logger

Logger builds a new logger based on the given flags.

Types

type Options

type Options struct {
	LogLevel *zapcore.Level
	Config   *zap.Config
}

Options holds the zap logger configuration.

Jump to

Keyboard shortcuts

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