# Functions
New returns a new golog with a default output to `os.Stdout` and level to `InfoLevel`.
NewRotateFileLog 创建一个根据时间周期切分的文件日志 root: 日志存储的根路径,不能为空 name: 日志的主文件名,可认为为 prefix lvl: 日志的记录的等级 pattern: 文件名的格式化字符串,如 %Y-%m-%d rotationTime: 文件切分的间隔 maxAge: 文件最大的时间有效期.
NewRotateWriter creates a new RotateLogs object.
ParseLevel returns a `golog.Level` from a string level.
TipInDevelopment 提供在开发模式下提示开发人员处理的信息.
WithMaxAge creates a new Option that sets the max age of a log file before it gets purged from the file system.
WithRotationTime creates a new Option that sets the time between rotation.
# Constants
DebugLevel will print on any level, fatals, errors, warnings, infos and debug logs.
DisableLevel will disable the printer.
ErrorLevel will print only errors.
FatalLevel will `os.Exit(1)` no matter the level of the logger.
InfoLevel will print errors, warnings and infos.
WarnLevel will print errors and warnings.
# Variables
DebugText can modify the prefix that will be prepended to the output message log when `Info/Infof` functions are being used.
ErrorText can modify the prefix that will be prepended to the output message log when `Error/Errorf` functions are being used.
GetTextForLevel is the function which has the "final" responsibility to generate the text (colorful or not) that is prepended to the leveled log message when `Error/Errorf, Warn/Warnf, Info/Infof or Debug/Debugf` functions are being called.
InfoText can modify the prefix that will be prepended to the output message log when `Info/Infof` functions are being used.
Levels contains the levels and their mapped (pointer of, in order to be able to be modified) metadata, callers are allowed to modify this package-level global variable without any loses.
Local is an object satisfying the Clock interface, which returns the current time in the local timezone.
NopOutput disables the output.
UTC is an object satisfying the Clock interface, which returns the current time in UTC.
WarnText can modify the prefix that will be prepended to the output message log when `Warn/Warnf` functions are being used.
# Structs
LevelMetadata describes the information behind a log Level, each level has its own unique metadata.
A Log represents a log line.
Logger is our golog 简化版.
RotateWriter represents a log file that gets automatically rotated as you write to it.
# Type aliases
Level is a number which defines the log level.