package
0.0.0-20240708094807-9bfd8036f0dc
Repository: https://github.com/abmpio/abmp.git
Documentation: pkg.go.dev
# Functions
AddOutput adds one or more `io.Writer` to the golog.Logger's Printer.
构建默认的logger.
Child (creates if not exists and) returns a new child Logger based on the default package-level logger instance.
No description provided by the author
Debug will print when logger's Level is debug.
Debugf will print when logger's Level is debug.
Error will print only when logger's Level is error, warn, info or debug.
Errorf will print only when logger's Level is error, warn, info or debug.
Fatal `os.Exit(1)` exit no matter the level of the logger.
Fatalf will `os.Exit(1)` no matter the level of the logger.
Handle adds a log handler to the default logger.
Hijack adds a hijacker to the low-level logger's Printer.
Info will print when logger's Level is info or debug.
Infof will print when logger's Level is info or debug.
Install receives an external logger and automatically adapts its print functions.
InstallStd receives a standard logger and automatically adapts its print functions.
Logf prints a leveled log message to the output.
NewLine can override the default package-level line breaker, "\n".
创建一个日志.
创建一个新的ILoggerSink实例.
Print prints a log message without levels and colors.
Println prints a log message without levels and colors.
注册一个日志sink name: sink的名称 level:sink处理的level.
Reset re-sets the default logger to an empty one.
Scan scans everything from "r" and prints its new contents to the logger's Printer's Output, forever or until the returning "cancel" is fired, once.
SetLevel alternatively you can use the exported `golog.Level` field, i.e `golog.Level = golog.ErrorLevel`.
SetOutput overrides the golog.Logger's Printer's output with another `io.Writer`.
SetPrefix sets a prefix for the default package-level Logger.
SetTimeFormat sets time format for logs, if "s" is empty then time representation will be off.
Warn will print when logger's Level is warn, info or debug.
Warnf will print when logger's Level is warn, info or debug.
使用固定字段.
No description provided by the author
# Constants
Available level names are: "disable" "fatal" "error" "warn" "info" "debug".
Available level names are: "disable" "fatal" "error" "warn" "info" "debug".
Available level names are: "disable" "fatal" "error" "warn" "info" "debug".
Available level names are: "disable" "fatal" "error" "warn" "info" "debug".
Available level names are: "disable" "fatal" "error" "warn" "info" "debug".
No description provided by the author
No description provided by the author
Available level names are: "disable" "fatal" "error" "warn" "info" "debug".
# Structs
No description provided by the author
# Interfaces
日志写入sink.