config

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogConf

type LogConf struct {
	Module   string `yaml:"module,omitempty"`
	Filename string `yaml:"filename,omitempty"`
	// 日志格式:logfmt、json
	Fmt string `yaml:"fmt,omitempty"`
	// 日志输出级别:debug、trace、info、warn、error
	Level string `yaml:"level,omitempty"`
	// 日志分割周期(单位:分钟)
	RotateInterval int `yaml:"rotateInterval,omitempty"`
	// 日志保留天数(单位:小时)
	RotateBackups int `yaml:"rotateBackups,omitempty"`
	// 是否输出到标准输出
	Console bool `yaml:"console,omitempty"`
	// 设置日志模式是否是异步
	Async bool `yaml:"async,omitempty"`
	// 设置异步模式下缓冲区大小
	BufSize int `yaml:"bufSize,omitempty"`
}

LogConfig is the log config of node

func GetDefLogConf

func GetDefLogConf() *LogConf

func LoadLogConf

func LoadLogConf(cfgFile string) (*LogConf, error)

Jump to

Keyboard shortcuts

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