zaputil

package
v1.9.5 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(opts *Options) (*zap.Logger, error)

Types

type Options

type Options struct {
	Development      bool                   `json:"development" yaml:"development" toml:"development"`                // 是否开发环境
	Level            string                 `json:"level" yaml:"level" toml:"level"`                                  // 日志等级,DEBUG,INFO,WARN,ERROR,FATAL
	Encoding         string                 `json:"encoding" yaml:"encoding" toml:"encoding"`                         // encoding = json; console
	OutputPaths      []string               `json:"outputPaths"  yaml:"outputPaths" toml:"outputPaths"`               // 日志文件输出路径列表,stdout和stderr内置
	ErrorOutputPaths []string               `json:"errorOutputPaths" yaml:"errorOutputPaths" toml:"errorOutputPaths"` // 错误日志文件输出路径列表,stdout和stderr内置
	InitialFields    map[string]interface{} `json:"initialFields" yaml:"initialFields" toml:"initialFields"`          // 默认字段,每条日志都包含
}

Jump to

Keyboard shortcuts

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