loglog

package module
v0.0.0-...-180f07a Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelEmergency = iota
	LevelAlert
	LevelCritical
	LevelError
	LevelWarning
	LevelNotice
	LevelInformational
	LevelDebug
)

Variables

View Source
var (
	Handler *logs.BeeLogger
)

Functions

func SetLevel

func SetLevel(l int)

Types

type LoggerConfig

type LoggerConfig struct {
	FileName            string `json:"filename"`
	Level               int    `json:"level"`    // 日志保存的时候的级别,默认是 Trace 级别
	Maxlines            int    `json:"maxlines"` // 每个文件保存的最大行数,默认值 1000000
	Maxsize             int    `json:"maxsize"`  // 每个文件保存的最大尺寸,默认值是 1 << 28, //256 MB
	Daily               bool   `json:"daily"`    // 是否按照每天 logrotate,默认是 true
	Maxdays             int    `json:"maxdays"`  // 文件最多保存多少天,默认保存 7 天
	Rotate              bool   `json:"rotate"`   // 是否开启 logrotate,默认是 true
	Perm                string `json:"perm"`     // 日志文件权限
	RotatePerm          string `json:"rotateperm"`
	EnableFuncCallDepth bool   `json:"-"` // 输出文件名和行号
	LogFuncCallDepth    int    `json:"-"` // 函数调用层级
}

beego 日志配置结构体

Jump to

Keyboard shortcuts

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