zaplogger

package
v0.0.0-...-c835f56 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(logCfg *Config) *zap.Logger

New returns initialised logger

Types

type Config

type Config struct {
	Development       bool     `mapstructure:"development"`
	Level             string   `mapstructure:"level"`
	Encoding          string   `mapstructure:"encoding"`
	DisableCaller     bool     `mapstructure:"disable_caller"`
	DisableStacktrace bool     `mapstructure:"disable_stacktrace"`
	DisableColor      bool     `mapstructure:"disable_color"`
	OutputPaths       []string `mapstructure:"output_paths"`
	ErrorOutputPaths  []string `mapstructure:"error_output_paths"`
}

Config mapstructure is for Viper to unmarshal TODO: add validation

Jump to

Keyboard shortcuts

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