Documentation ¶
Overview ¶
Package log micserver 中使用的 log 系统,支持 Syslog(系统信息)/Debug(调试)/Info(关心的)/ Warning(警告)/Error(错误)/Fatal(致命) 日志级别,日志可按大小/小时转储。 建议: 系统运行的各个细节/详细步骤使用 Syslog 级别记录,为了减小 log 系统造成的运算负担, 应该先使用 IsSyslogEnable() 判断 Syslog 级别的日志是否开启,再调用 Syslog() 记录; 业务的主要环节/关键节点的调试使用 Debug 级别记录; 业务造成的结果,或需要在后续运营维护中查看用户信息变更,使用 Info 级别记录; 客户端/用户的输入错误,或者系统设计意外的条件不满足,使用 Warning 级别记录; 该分布式系统内部的错误值(与客户端等无关),但是可以恢复或者对业务逻辑没有影响时, 使用 Error 级别记录; 在 Error 级别的基础上,如果错误无法代码恢复或者对业务逻辑产生必要影响时,使用 Fatal 级别记录。 在生产环境/正式环境中,应该将日志等级至高调整至 Info ,在需要必要的调试信息时, 可调整至 Debug 。不要在正式环境中启用 Syslog 日志等级,你只应该在开发环境中使用它。 Warning / Error / Fatal 日志级别,无论何时你都要谨慎关闭他们,如果你确定不关心 你业务的信息,可以调整至 Warning 级别,但是无论如何,关闭警告或者错误都是一个极具风险 的决定。
Index ¶
- Constants
- Variables
- func DPanic(fmt string, args ...interface{})
- func Debug(fmt string, args ...interface{})
- func Error(fmt string, args ...interface{})
- func Fatal(fmt string, args ...interface{})
- func Info(fmt string, args ...interface{})
- func IsDPanicEnable() bool
- func IsDebugEnable() bool
- func IsErrorEnable() bool
- func IsFatalEnable() bool
- func IsInfoEnable() bool
- func IsPanicEnable() bool
- func IsSyslogEnable() bool
- func IsWarnEnable() bool
- func Panic(fmt string, args ...interface{})
- func SetDefaultLogger(l *Logger)
- func SetLogLevel(lvl Level)
- func SetLogLevelByStr(lvl string) error
- func Syslog(fmt string, args ...interface{})
- func Warn(fmt string, args ...interface{})
- type AtomicLevel
- type Field
- func Any(key string, value interface{}) Field
- func Array(key string, val core.ArrayMarshaler) Field
- func Binary(key string, val []byte) Field
- func Bool(key string, val bool) Field
- func Boolp(key string, val *bool) Field
- func Bools(key string, bs []bool) Field
- func ByteString(key string, val []byte) Field
- func ByteStrings(key string, bss [][]byte) Field
- func Complex128(key string, val complex128) Field
- func Complex128p(key string, val *complex128) Field
- func Complex128s(key string, nums []complex128) Field
- func Complex64(key string, val complex64) Field
- func Complex64p(key string, val *complex64) Field
- func Complex64s(key string, nums []complex64) Field
- func Duration(key string, val time.Duration) Field
- func Durationp(key string, val *time.Duration) Field
- func Durations(key string, ds []time.Duration) Field
- func ErrorField(err error) Field
- func Errors(key string, errs []error) Field
- func Float32(key string, val float32) Field
- func Float32p(key string, val *float32) Field
- func Float32s(key string, nums []float32) Field
- func Float64(key string, val float64) Field
- func Float64p(key string, val *float64) Field
- func Float64s(key string, nums []float64) Field
- func Int(key string, val int) Field
- func Int16(key string, val int16) Field
- func Int16p(key string, val *int16) Field
- func Int16s(key string, nums []int16) Field
- func Int32(key string, val int32) Field
- func Int32p(key string, val *int32) Field
- func Int32s(key string, nums []int32) Field
- func Int64(key string, val int64) Field
- func Int64p(key string, val *int64) Field
- func Int64s(key string, nums []int64) Field
- func Int8(key string, val int8) Field
- func Int8p(key string, val *int8) Field
- func Int8s(key string, nums []int8) Field
- func Intp(key string, val *int) Field
- func Ints(key string, nums []int) Field
- func NamedError(key string, err error) Field
- func Namespace(key string) Field
- func Object(key string, val core.ObjectMarshaler) Field
- func Reflect(key string, val interface{}) Field
- func Skip() Field
- func Stack(key string) Field
- func String(key string, val string) Field
- func Stringer(key string, val fmt.Stringer) Field
- func Stringp(key string, val *string) Field
- func Strings(key string, ss []string) Field
- func Time(key string, val time.Time) Field
- func Timep(key string, val *time.Time) Field
- func Times(key string, ts []time.Time) Field
- func Uint(key string, val uint) Field
- func Uint16(key string, val uint16) Field
- func Uint16p(key string, val *uint16) Field
- func Uint16s(key string, nums []uint16) Field
- func Uint32(key string, val uint32) Field
- func Uint32p(key string, val *uint32) Field
- func Uint32s(key string, nums []uint32) Field
- func Uint64(key string, val uint64) Field
- func Uint64p(key string, val *uint64) Field
- func Uint64s(key string, nums []uint64) Field
- func Uint8(key string, val uint8) Field
- func Uint8p(key string, val *uint8) Field
- func Uint8s(key string, nums []uint8) Field
- func Uintp(key string, val *uint) Field
- func Uintptr(key string, val uintptr) Field
- func Uintptrp(key string, val *uintptr) Field
- func Uintptrs(key string, us []uintptr) Field
- func Uints(key string, nums []uint) Field
- type Flusher
- type ILogger
- type Level
- type LevelEnablerFunc
- type Logger
- func (l *Logger) Clone() *Logger
- func (l *Logger) Debug(fmt string, args ...interface{})
- func (l *Logger) Error(fmt string, args ...interface{})
- func (l *Logger) Fatal(fmt string, args ...interface{})
- func (l *Logger) GetLogger() *Logger
- func (l *Logger) Info(fmt string, args ...interface{})
- func (l *Logger) IsDPanicEnable() bool
- func (l *Logger) IsDebugEnable() bool
- func (l *Logger) IsErrorEnable() bool
- func (l *Logger) IsFatalEnable() bool
- func (l *Logger) IsInfoEnable() bool
- func (l *Logger) IsPanicEnable() bool
- func (l *Logger) IsSyslogEnable() bool
- func (l *Logger) IsWarnEnable() bool
- func (l *Logger) Panic(fmt string, args ...interface{})
- func (l *Logger) SetLogLevel(lvl Level)
- func (l *Logger) SetLogLevelByStr(lvl string) error
- func (l *Logger) SetLogName(logname string)
- func (l *Logger) SetTopic(topic string) error
- func (l *Logger) Syslog(fmt string, args ...interface{})
- func (l *Logger) Warn(fmt string, args ...interface{})
- func (l *Logger) With(fields ...Field) *Logger
- type Option
- type Record
- type Rotater
- type TOptions
- func (o *TOptions) AddCaller() *TOptions
- func (o *TOptions) AddCallerSkip(skip int) *TOptions
- func (o *TOptions) AddStack(value core.LevelEnabler) *TOptions
- func (o *TOptions) AsyncWrite(value bool) *TOptions
- func (o *TOptions) AsyncWriteDuration(value time.Duration) *TOptions
- func (o *TOptions) Development() *TOptions
- func (o *TOptions) ErrorOutput(value core.WriteSyncer) *TOptions
- func (o *TOptions) Fields(fs ...Field) *TOptions
- func (o *TOptions) FilePaths(path ...string) *TOptions
- func (o *TOptions) Hooks(hooks ...func(core.Entry) error) *TOptions
- func (o *TOptions) Level(value Level) *TOptions
- func (o *TOptions) Name(value string) *TOptions
- func (o *TOptions) NoConsole(value bool) *TOptions
- func (o *TOptions) NoConsoleColor(value bool) *TOptions
- func (o *TOptions) RecordTimeLayout(value string) *TOptions
- func (o *TOptions) RedirectError(value bool) *TOptions
- func (o *TOptions) RotateTimeLayout(value string) *TOptions
- func (o *TOptions) Topic(value string) *TOptions
- func (o *TOptions) WithCaller(enabled bool) *TOptions
- func (o *TOptions) WrapCore(f func(core.Core) core.Core) *TOptions
- type Writer
Constants ¶
const ( // SysLevel logs are typically voluminous, and are usually disabled in // production. SysLevel = core.SysLevel // DebugLevel logs are typically voluminous, and are usually disabled in // production. DebugLevel = core.DebugLevel // InfoLevel is the default logging priority. InfoLevel = core.InfoLevel // WarnLevel logs are more important than Info, but don't need individual // human review. WarnLevel = core.WarnLevel // ErrorLevel logs are high-priority. If an application is running smoothly, // it shouldn't generate any error-level logs. ErrorLevel = core.ErrorLevel // DPanicLevel logs are particularly important errors. In development the // logger panics after writing the message. DPanicLevel = core.DPanicLevel // PanicLevel logs a message, then panics. PanicLevel = core.PanicLevel // FatalLevel logs a message, then calls os.Exit(1). FatalLevel = core.FatalLevel )
Variables ¶
var ( ErrNilLogger = errors.New("logger is nil") ErrUnknownLogLevel = errors.New("unknown log level") )
error
Functions ¶
func DPanic ¶ added in v0.1.1
func DPanic(fmt string, args ...interface{})
DPanic 默认 Logger 异步输出一条 DPanic 级别的日志
func IsDPanicEnable ¶ added in v0.1.1
func IsDPanicEnable() bool
IsDPanicEnable 默认 Logger 判断 DPanic 日志级别是否开启
func IsPanicEnable ¶ added in v0.1.1
func IsPanicEnable() bool
IsPanicEnable 默认 Logger 判断 Panic 日志级别是否开启
func Panic ¶ added in v0.1.1
func Panic(fmt string, args ...interface{})
Panic 默认 Logger 异步输出一条 Panic 级别的日志
func SetLogLevelByStr ¶
SetLogLevelByStr 默认 Logger 使用等级名设置日志等级
Types ¶
type AtomicLevel ¶ added in v0.1.1
type AtomicLevel struct {
// contains filtered or unexported fields
}
An AtomicLevel is an atomically changeable, dynamic logging level. It lets you safely change the log level of a tree of loggers (the root logger and any children created by adding context) at runtime.
The AtomicLevel itself is an http.Handler that serves a JSON endpoint to alter its level.
AtomicLevels must be created with the NewAtomicLevel constructor to allocate their internal atomic pointer.
func NewAtomicLevel ¶ added in v0.1.1
func NewAtomicLevel() AtomicLevel
NewAtomicLevel creates an AtomicLevel with InfoLevel and above logging enabled.
func NewAtomicLevelAt ¶ added in v0.1.1
func NewAtomicLevelAt(l core.Level) AtomicLevel
NewAtomicLevelAt is a convenience function that creates an AtomicLevel and then calls SetLevel with the given level.
func (AtomicLevel) Enabled ¶ added in v0.1.1
func (lvl AtomicLevel) Enabled(l core.Level) bool
Enabled implements the core.LevelEnabler interface, which allows the AtomicLevel to be used in place of traditional static levels.
func (AtomicLevel) Level ¶ added in v0.1.1
func (lvl AtomicLevel) Level() core.Level
Level returns the minimum enabled log level.
func (AtomicLevel) MarshalText ¶ added in v0.1.1
func (lvl AtomicLevel) MarshalText() (text []byte, err error)
MarshalText marshals the AtomicLevel to a byte slice. It uses the same text representation as the static core.Levels ("debug", "info", "warn", "error", "dpanic", "panic", and "fatal").
func (AtomicLevel) SetLevel ¶ added in v0.1.1
func (lvl AtomicLevel) SetLevel(l core.Level)
SetLevel alters the logging level.
func (AtomicLevel) String ¶ added in v0.1.1
func (lvl AtomicLevel) String() string
String returns the string representation of the underlying Level.
func (*AtomicLevel) UnmarshalText ¶ added in v0.1.1
func (lvl *AtomicLevel) UnmarshalText(text []byte) error
UnmarshalText unmarshals the text to an AtomicLevel. It uses the same text representations as the static core.Levels ("debug", "info", "warn", "error", "dpanic", "panic", and "fatal").
type Field ¶ added in v0.1.1
Field is an alias for Field. Aliasing this type dramatically improves the navigability of this package's API documentation.
func Any ¶ added in v0.1.1
Any takes a key and an arbitrary value and chooses the best way to represent them as a field, falling back to a reflection-based approach only if necessary.
Since byte/uint8 and rune/int32 are aliases, Any can't differentiate between them. To minimize surprises, []byte values are treated as binary blobs, byte values are treated as uint8, and runes are always treated as integers.
func Array ¶ added in v0.1.1
func Array(key string, val core.ArrayMarshaler) Field
Array constructs a field with the given key and ArrayMarshaler. It provides a flexible, but still type-safe and efficient, way to add array-like types to the logging context. The struct's MarshalLogArray method is called lazily.
func Binary ¶ added in v0.1.1
Binary constructs a field that carries an opaque binary blob.
Binary data is serialized in an encoding-appropriate format. For example, core's JSON encoder base64-encodes binary blobs. To log UTF-8 encoded text, use ByteString.
func Boolp ¶ added in v0.1.1
Boolp constructs a field that carries a *bool. The returned Field will safely and explicitly represent `nil` when appropriate.
func ByteString ¶ added in v0.1.1
ByteString constructs a field that carries UTF-8 encoded text as a []byte. To log opaque binary blobs (which aren't necessarily valid UTF-8), use Binary.
func ByteStrings ¶ added in v0.1.1
ByteStrings constructs a field that carries a slice of []byte, each of which must be UTF-8 encoded text.
func Complex128 ¶ added in v0.1.1
func Complex128(key string, val complex128) Field
Complex128 constructs a field that carries a complex number. Unlike most numeric fields, this costs an allocation (to convert the complex128 to interface{}).
func Complex128p ¶ added in v0.1.1
func Complex128p(key string, val *complex128) Field
Complex128p constructs a field that carries a *complex128. The returned Field will safely and explicitly represent `nil` when appropriate.
func Complex128s ¶ added in v0.1.1
func Complex128s(key string, nums []complex128) Field
Complex128s constructs a field that carries a slice of complex numbers.
func Complex64 ¶ added in v0.1.1
Complex64 constructs a field that carries a complex number. Unlike most numeric fields, this costs an allocation (to convert the complex64 to interface{}).
func Complex64p ¶ added in v0.1.1
Complex64p constructs a field that carries a *complex64. The returned Field will safely and explicitly represent `nil` when appropriate.
func Complex64s ¶ added in v0.1.1
Complex64s constructs a field that carries a slice of complex numbers.
func Duration ¶ added in v0.1.1
Duration constructs a field with the given key and value. The encoder controls how the duration is serialized.
func Durationp ¶ added in v0.1.1
Durationp constructs a field that carries a *time.Duration. The returned Field will safely and explicitly represent `nil` when appropriate.
func Durations ¶ added in v0.1.1
Durations constructs a field that carries a slice of time.Durations.
func ErrorField ¶ added in v0.1.1
ErrorField is shorthand for the common idiom NamedError("error", err).
func Float32 ¶ added in v0.1.1
Float32 constructs a field that carries a float32. The way the floating-point value is represented is encoder-dependent, so marshaling is necessarily lazy.
func Float32p ¶ added in v0.1.1
Float32p constructs a field that carries a *float32. The returned Field will safely and explicitly represent `nil` when appropriate.
func Float64 ¶ added in v0.1.1
Float64 constructs a field that carries a float64. The way the floating-point value is represented is encoder-dependent, so marshaling is necessarily lazy.
func Float64p ¶ added in v0.1.1
Float64p constructs a field that carries a *float64. The returned Field will safely and explicitly represent `nil` when appropriate.
func Int16p ¶ added in v0.1.1
Int16p constructs a field that carries a *int16. The returned Field will safely and explicitly represent `nil` when appropriate.
func Int32p ¶ added in v0.1.1
Int32p constructs a field that carries a *int32. The returned Field will safely and explicitly represent `nil` when appropriate.
func Int64p ¶ added in v0.1.1
Int64p constructs a field that carries a *int64. The returned Field will safely and explicitly represent `nil` when appropriate.
func Int8p ¶ added in v0.1.1
Int8p constructs a field that carries a *int8. The returned Field will safely and explicitly represent `nil` when appropriate.
func Intp ¶ added in v0.1.1
Intp constructs a field that carries a *int. The returned Field will safely and explicitly represent `nil` when appropriate.
func NamedError ¶ added in v0.1.1
NamedError constructs a field that lazily stores err.Error() under the provided key. Errors which also implement fmt.Formatter (like those produced by github.com/liasece/micserver/util/errors) will also have their verbose representation stored under key+"Verbose". If passed a nil error, the field is a no-op.
For the common case in which the key is simply "error", the Error function is shorter and less repetitive.
func Namespace ¶ added in v0.1.1
Namespace creates a named, isolated scope within the logger's context. All subsequent fields will be added to the new namespace.
This helps prevent key collisions when injecting loggers into sub-components or third-party libraries.
func Object ¶ added in v0.1.1
func Object(key string, val core.ObjectMarshaler) Field
Object constructs a field with the given key and ObjectMarshaler. It provides a flexible, but still type-safe and efficient, way to add map- or struct-like user-defined types to the logging context. The struct's MarshalLogObject method is called lazily.
func Reflect ¶ added in v0.1.1
Reflect constructs a field with the given key and an arbitrary object. It uses an encoding-appropriate, reflection-based function to lazily serialize nearly any object into the logging context, but it's relatively slow and allocation-heavy. Outside tests, Any is always a better choice.
If encoding fails (e.g., trying to serialize a map[int]string to JSON), Reflect includes the error message in the final log output.
func Skip ¶ added in v0.1.1
func Skip() Field
Skip constructs a no-op field, which is often useful when handling invalid inputs in other Field constructors.
func Stack ¶ added in v0.1.1
Stack constructs a field that stores a stacktrace of the current goroutine under provided key. Keep in mind that taking a stacktrace is eager and expensive (relatively speaking); this function both makes an allocation and takes about two microseconds.
func Stringer ¶ added in v0.1.1
Stringer constructs a field with the given key and the output of the value's String method. The Stringer's String method is called lazily.
func Stringp ¶ added in v0.1.1
Stringp constructs a field that carries a *string. The returned Field will safely and explicitly represent `nil` when appropriate.
func Time ¶ added in v0.1.1
Time constructs a Field with the given key and value. The encoder controls how the time is serialized.
func Timep ¶ added in v0.1.1
Timep constructs a field that carries a *time.Time. The returned Field will safely and explicitly represent `nil` when appropriate.
func Uint16p ¶ added in v0.1.1
Uint16p constructs a field that carries a *uint16. The returned Field will safely and explicitly represent `nil` when appropriate.
func Uint16s ¶ added in v0.1.1
Uint16s constructs a field that carries a slice of unsigned integers.
func Uint32p ¶ added in v0.1.1
Uint32p constructs a field that carries a *uint32. The returned Field will safely and explicitly represent `nil` when appropriate.
func Uint32s ¶ added in v0.1.1
Uint32s constructs a field that carries a slice of unsigned integers.
func Uint64p ¶ added in v0.1.1
Uint64p constructs a field that carries a *uint64. The returned Field will safely and explicitly represent `nil` when appropriate.
func Uint64s ¶ added in v0.1.1
Uint64s constructs a field that carries a slice of unsigned integers.
func Uint8p ¶ added in v0.1.1
Uint8p constructs a field that carries a *uint8. The returned Field will safely and explicitly represent `nil` when appropriate.
func Uintp ¶ added in v0.1.1
Uintp constructs a field that carries a *uint. The returned Field will safely and explicitly represent `nil` when appropriate.
func Uintptrp ¶ added in v0.1.1
Uintptrp constructs a field that carries a *uintptr. The returned Field will safely and explicitly represent `nil` when appropriate.
type ILogger ¶
type ILogger interface { Syslog(fmt string, args ...interface{}) Debug(fmt string, args ...interface{}) Warn(fmt string, args ...interface{}) Info(fmt string, args ...interface{}) Error(fmt string, args ...interface{}) Fatal(fmt string, args ...interface{}) IsSyslogEnable() bool IsDebugEnable() bool IsWarnEnable() bool IsInfoEnable() bool IsErrorEnable() bool IsFatalEnable() bool Clone() *Logger SetTopic(topic string) GetLogLevel() int32 SetLogName(logname string) GetLogger() *Logger }
ILogger 日志系统实现的接口
type LevelEnablerFunc ¶ added in v0.1.1
LevelEnablerFunc is a convenient way to implement core.LevelEnabler with an anonymous function.
It's particularly useful when splitting log output between different outputs (e.g., standard error and standard out). For sample code, see the package-level AdvancedConfiguration example.
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger 日志实例
func (*Logger) GetLogger ¶
GetLogger get current Logger's Logger, mening Logger isn't nil, if nil, will be called defaultLogger to opration, so return defaultLogger.
func (*Logger) IsDPanicEnable ¶ added in v0.1.1
IsDPanicEnable 判断 DPanic 日志级别是否开启
func (*Logger) IsDebugEnable ¶
IsDebugEnable 判断 Debug 日志级别是否开启
func (*Logger) IsErrorEnable ¶
IsErrorEnable 判断 Error 日志级别是否开启
func (*Logger) IsFatalEnable ¶
IsFatalEnable 判断 Fatal 日志级别是否开启
func (*Logger) IsPanicEnable ¶ added in v0.1.1
IsPanicEnable 判断 Panic 日志级别是否开启
func (*Logger) IsSyslogEnable ¶
IsSyslogEnable 判断 Syslog 日志级别是否开启
func (*Logger) SetLogLevelByStr ¶
SetLogLevelByStr 使用等级名设置日志等级
func (*Logger) SetLogName ¶
SetLogName 设置日志名称,一般使用进程或者模块名字
type Option ¶ added in v0.1.1
type Option interface {
// contains filtered or unexported methods
}
An Option configures a Logger.
type TOptions ¶ added in v0.1.1
type TOptions struct {
// contains filtered or unexported fields
}
TOptions type of options
func (*TOptions) AddCaller ¶ added in v0.1.1
AddCaller configures the Logger to annotate each message with the filename and line number of log's caller. See also WithCaller.
func (*TOptions) AddCallerSkip ¶ added in v0.1.1
AddCallerSkip increases the number of callers skipped by caller annotation (as enabled by the AddCaller option). When building wrappers around the Logger and SugaredLogger, supplying this Option prevents log from always reporting the wrapper code as the caller.
func (*TOptions) AddStack ¶ added in v0.1.1
func (o *TOptions) AddStack(value core.LevelEnabler) *TOptions
AddStack add config to the Logger.
func (*TOptions) AsyncWrite ¶ added in v0.1.1
AsyncWrite add config to the Logger.
func (*TOptions) AsyncWriteDuration ¶ added in v0.1.1
AsyncWriteDuration add config to the Logger.
func (*TOptions) Development ¶ added in v0.1.1
Development puts the logger in development mode, which makes DPanic-level logs panic instead of simply logging an error.
func (*TOptions) ErrorOutput ¶ added in v0.1.1
func (o *TOptions) ErrorOutput(value core.WriteSyncer) *TOptions
ErrorOutput add config to the Logger.
func (*TOptions) Hooks ¶ added in v0.1.1
Hooks registers functions which will be called each time the Logger writes out an Entry. Repeated use of Hooks is additive.
Hooks are useful for simple side effects, like capturing metrics for the number of emitted logs. More complex side effects, including anything that requires access to the Entry's structured fields, should be implemented as a core.Core instead. See core.RegisterHooks for details.
func (*TOptions) NoConsoleColor ¶ added in v0.1.1
NoConsoleColor add config to the Logger.
func (*TOptions) RecordTimeLayout ¶ added in v0.1.1
RecordTimeLayout add config to the Logger.
func (*TOptions) RedirectError ¶ added in v0.1.1
RedirectError add config to the Logger.
func (*TOptions) RotateTimeLayout ¶ added in v0.1.1
RotateTimeLayout add config to the Logger.
func (*TOptions) WithCaller ¶ added in v0.1.1
WithCaller configures the Logger to annotate each message with the filename and line number of log's caller, or not, depending on the value of enabled. This is a generalized form of AddCaller.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package buffer provides a thin wrapper around a byte slice.
|
Package buffer provides a thin wrapper around a byte slice. |
Package core defines and implements the low-level interfaces upon which core is built.
|
Package core defines and implements the low-level interfaces upon which core is built. |
internal
|
|
bufferpool
Package bufferpool houses core's shared internal buffer pool.
|
Package bufferpool houses core's shared internal buffer pool. |
color
Package color adds coloring functionality for TTY output.
|
Package color adds coloring functionality for TTY output. |
exit
Package exit provides stubs so that unit tests can exercise code that calls os.Exit(1).
|
Package exit provides stubs so that unit tests can exercise code that calls os.Exit(1). |
ztest
Package ztest provides low-level helpers for testing log output.
|
Package ztest provides low-level helpers for testing log output. |
Package test provides a variety of helpers for testing log output.
|
Package test provides a variety of helpers for testing log output. |
observer
Package observer provides a core.Core that keeps an in-memory, encoding-agnostic repesentation of log entries.
|
Package observer provides a core.Core that keeps an in-memory, encoding-agnostic repesentation of log entries. |