Documentation ¶
Index ¶
- Variables
- func BuildDefaultLog(level Level, encoder zapcore.Encoder, ws ...zapcore.WriteSyncer) *zap.Logger
- func Debug(a ...interface{})
- func Debugf(format string, a ...interface{})
- func Debugw(keyvals ...interface{})
- func DefaultZapEncoder() zapcore.Encoder
- func Error(a ...interface{})
- func Errorf(format string, a ...interface{})
- func Errorw(keyvals ...interface{})
- func Fatal(a ...interface{})
- func Fatalf(format string, a ...interface{})
- func Fatalw(keyvals ...interface{})
- func Info(a ...interface{})
- func Infof(format string, a ...interface{})
- func Infow(keyvals ...interface{})
- func Log(level Level, keyvals ...interface{})
- func NewLogger(l Logger, opts ...Option) *logcat
- func SetLogger(logger Logger)
- func Value(ctx context.Context, v interface{}) interface{}
- func Warn(a ...interface{})
- func Warnf(format string, a ...interface{})
- func Warnw(keyvals ...interface{})
- type Filter
- type FilterOption
- type Level
- type Logger
- type Option
- type Valuer
- type ZapLogger
- type ZapOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultCaller is a Valuer that returns the file and line. DefaultCaller = Caller(4) // DefaultTimestamp is a Valuer that returns the current wallclock time. DefaultTimestamp = Timestamp(time.RFC3339) )
View Source
var DefaultMessageKey = "msg"
View Source
var LogCat *logcat
Functions ¶
func BuildDefaultLog ¶ added in v1.2.0
Types ¶
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
func NewFilter ¶
func NewFilter(logger Logger, opts ...FilterOption) *Filter
type FilterOption ¶
type FilterOption func(*Filter)
func FilterFunc ¶
func FilterFunc(f func(level Level, keyvals ...interface{}) bool) FilterOption
FilterFunc with filter func.
func FilterLevel ¶
func FilterLevel(level Level) FilterOption
type Valuer ¶
Valuer is returns a log value.
type ZapLogger ¶
type ZapLogger struct {
// contains filtered or unexported fields
}
func NewZapLogger ¶
Click to show internal directories.
Click to hide internal directories.