Documentation ¶
Index ¶
- func Check(lvl zapcore.Level, msg string) *zapcore.CheckedEntry
- func ConsoleCore(lvl zap.AtomicLevel) zapcore.Core
- func Debug(args ...interface{})
- func Debugf(template string, args ...interface{})
- func Debugw(template string, fields ...zap.Field)
- func Error(args ...interface{})
- func Errorf(template string, args ...interface{})
- func Errorw(template string, fields ...zap.Field)
- func Fatal(args ...interface{})
- func Fatalf(template string, args ...interface{})
- func Fatalw(template string, fields ...zap.Field)
- func Info(args ...interface{})
- func Infof(template string, args ...interface{})
- func Infow(template string, fields ...zap.Field)
- func InjectActivity(ctx context.Context, logger *zap.Logger) *zap.Logger
- func Named(name string) *zap.Logger
- func Namespace(namespace string) *zap.SugaredLogger
- func NewConfig(level zapcore.Level) zap.Config
- func NewEncoderConfig() zapcore.EncoderConfig
- func SetLevel(level zapcore.Level)
- func Sync() error
- func Warn(args ...interface{})
- func Warnf(template string, args ...interface{})
- func Warnw(template string, fields ...zap.Field)
- func With(fields ...zap.Field) *zap.Logger
- func WithTrace(ctx context.Context) *zap.Logger
- type CoreBuilder
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Check ¶
func Check(lvl zapcore.Level, msg string) *zapcore.CheckedEntry
Check returns (*zap.Logger).Check()
func ConsoleCore ¶
func ConsoleCore(lvl zap.AtomicLevel) zapcore.Core
func Debugf ¶
func Debugf(template string, args ...interface{})
Debugf executes (*zap.Logger).Sugar().Debugf()
func Errorf ¶
func Errorf(template string, args ...interface{})
Errorf executes (*zap.Logger).Sugar().Errorf()
func Fatalf ¶
func Fatalf(template string, args ...interface{})
Fatalf executes (*zap.Logger).Sugar().Fatalf()
func Infof ¶
func Infof(template string, args ...interface{})
Infof executes (*zap.Logger).Sugar().Infof()
func InjectActivity ¶ added in v1.0.8
InjectActivity reads trace information from the `SpanContext` and adds the tracing fields returning the logger.
func Namespace ¶
func Namespace(namespace string) *zap.SugaredLogger
Namespace returns (*zap.Logger).With(Namespace())
func NewConfig ¶
NewConfig is an opinionated production config used throughout self-developed applications. It uses a JSON encoder, writes to standard error, and enables sampling. Stacktraces are automatically included on logs of ErrorLevel and above.
func NewEncoderConfig ¶
func NewEncoderConfig() zapcore.EncoderConfig
NewEncoderConfig is an opinionated production encoding config used throughout self-developed applications. Rather then the default ISO8601 it uses RFC3339 with nano seconds. Durations are also encoded with a nano second represetation rather than the default second.
func Warnf ¶
func Warnf(template string, args ...interface{})
Warnf executes (*zap.Logger).Sugar().Warnf()
Types ¶
type CoreBuilder ¶
type CoreBuilder func(lvl zap.AtomicLevel) zapcore.Core
func JSONCore ¶
func JSONCore(syncs ...zapcore.WriteSyncer) CoreBuilder