Documentation ¶
Index ¶
- Constants
- Variables
- type Level
- type Option
- func WithIsStdOut(isstdout string) Option
- func WithLogLevel(loglevel string) Option
- func WithLogName(logname string) Option
- func WithLogPath(logpath string) Option
- func WithMaxAge(maxage int) Option
- func WithMaxSize(maxsize int) Option
- func WithProjectName(projectname string) Option
- func WithStacktrace(stacktrace string) Option
- type Options
Constants ¶
View Source
const ( LogPath string = "/var/log" //日志保存路径 LogName string = "output" //日志保存的名称,不些随机生成 LogLevel string = "debug" //日志记录级别 MaxSize int = 100 //日志分割的尺寸 MB MaxAge int = 7 //分割日志保存的时间 day Stacktrace string = "error" //记录堆栈的级别 IsStdOut string = "yes" //是否标准输出console输出 ProjectName string = "test" //项目名称 )
默认参数
Variables ¶
View Source
var AllLevels = []Level{ PanicLevel, FatalLevel, ErrorLevel, WarnLevel, InfoLevel, DebugLevel, }
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Options)
func WithIsStdOut ¶
func WithLogLevel ¶
func WithLogName ¶
func WithLogPath ¶
func WithMaxAge ¶
func WithMaxSize ¶
func WithProjectName ¶
func WithStacktrace ¶
Click to show internal directories.
Click to hide internal directories.