# README
log
zap logger with lumberjack
Features
Usage
Installation
Use go get.
go get github.com/things-go/log
Then import the package into your own code.
import "github.com/things-go/log"
Example
License
This project is under MIT License. See the LICENSE file for the full license text.
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Caller returns a Valuer that returns a pkg/file:line description of the caller.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Enabled returns true if the given level is at or above this level.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
File returns a Valuer that returns a pkg/file:line description of the caller.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GetLevel returns the minimum enabled log level.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Logger return internal logger.
No description provided by the author
Named adds a sub-scope to the logger's name.
No description provided by the author
No description provided by the author
New constructs a new Log.
NewLogger new logger.
NewLoggerWith new logger with zap logger and atomic level.
No description provided by the author
Package returns a Valuer that returns an immutable Valuer which key is pkg.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ReplaceGlobals replaces the global Log only once.
No description provided by the author
SetDefaultValuer set default field function, which hold always until you call WithContext.
SetLevel alters the logging level.
SetLevelWithText alters the logging level.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Sugar wraps the Logger to provide a more ergonomic, but slightly slower, API.
Sync flushes any buffered log entries.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
V returns true if the given level is at or above this level.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
With adds a variadic number of fields to the logging context.
WithAdapter with adapter file,console,multi,custom,file-custom,console-custom,multi-custom writer: 当 adapter=custom使用,如果为writer为空,将使用os.Stdout 默认 console.
WithAddCaller with AddCaller 是否输出调用 filename 和 line number.
WithCallerSkip when AddCaller enabled.
WithConfig with config.
WithContext return log with inject context.
WithEnableCompress with compress 是否使用gzip压缩文件, 采用默认不压缩.
WithEnableLocalTime with local time 是否格式化时间戳, 默认UTC时间.
WithEncodeLevel with EncodeLevel LowercaseLevelEncoder: 小写编码器 LowercaseColorLevelEncoder: 小写编码器带颜色 CapitalLevelEncoder: 大写编码器 CapitalColorLevelEncoder: 大写编码器带颜色 默认: LowercaseLevelEncoder.
EncoderConfig 如果配置该项,则 EncodeLevel 将被覆盖.
WithFilename with filename 空字符使用默认, 默认<processname>-lumberjack.log.
WithFormat with format json,console 默认json.
WithLevel with level debug,info,warn,error,dpanic,panic,fatal 默认warn.
WithMaxAge with max age 日志文件保存天数, 默认0 不删除.
WithMaxBackups with max backup 日志文件保存备份数, 默认0 都保存.
WithMaxSize with max size 每个日志文件最大尺寸(MB), 默认100MB.
WithNewValuer return log with new Valuer function without default Valuer.
WithPath with path 日志保存路径, 默认 empty, 即当前路径.
WithStack with stack Stack 是否使能栈调试输出, 默认false.
WithValuer with field function.
# Constants
console.
console and custom io.Writer.
custom io.Writer.
file.
file and custom io.Writer.
file and console.
file, console and custom io.Writer.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
format defined.
format defined.
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
Config 日志配置.
Log wrap zap logger - methods named after the log level or ending in "Context" for log.Print-style logging - methods ending in "w" or "wContext" for loosely-typed structured logging - methods ending in "f" or "fContext" for log.Printf-style logging - methods ending in "x" or "xContext" for structured logging.
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
Option An Option configures a Log.
Valuer is returns a log value.