common

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTimeEncoder

func GetTimeEncoder(name string) (zapcore.TimeEncoder, error)

Types

type JsonEncoderConfig

type JsonEncoderConfig struct {
	TimeKey       string `logn-config:"time_key"`
	LevelKey      string `logn-config:"level_key"`
	NameKey       string `logn-config:"name_key"`
	CallerKey     string `logn-config:"caller_key"`
	MessageKey    string `logn-config:"message_key"`
	StacktraceKey string `logn-config:"stacktrace_key"`
	LineEnding    string `logn-config:"line_ending"`
	TimeEncoder   string `logn-config:"time_encoder" logn-validate:"logn.oneof=epoch epoch_millis epoch_nanos ISO8601"`
}

Config is used to pass encoding parameters to New.

Jump to

Keyboard shortcuts

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