Documentation ¶
Index ¶
- func Debug(msg string, keysAndValues ...interface{})
- func Error(msg string, keysAndValues ...interface{})
- func Info(msg string, keysAndValues ...interface{})
- func NewConfig() zap.Config
- func NewEncoderConfig() zapcore.EncoderConfig
- func NewLogger(env string, opts ...Option) debugcore.Logger
- func Warn(msg string, keysAndValues ...interface{})
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
func Debug(msg string, keysAndValues ...interface{})
Debug will accept custom argument pairs that you wish to Log. It will produce a json-encoded string. See: https://godoc.org/go.uber.org/zap
func Error ¶
func Error(msg string, keysAndValues ...interface{})
Error will accept custom argument pairs that you wish to Log. It will produce a json-encoded string. See: https://godoc.org/go.uber.org/zap
func Info ¶
func Info(msg string, keysAndValues ...interface{})
Info will accept custom argument pairs that you wish to Log. It will produce a json-encoded string. See: https://godoc.org/go.uber.org/zap
func NewConfig ¶
NewConfig is a reasonable development logging configuration. Logging is enabled at DebugLevel and above.
It enables development mode (which makes DPanicLevel logs panic), uses a console encoder, writes to standard error, and disables sampling. Stacktraces are automatically included on logs of WarnLevel and above.
func NewEncoderConfig ¶
func NewEncoderConfig() zapcore.EncoderConfig
NewEncoderConfig returns an opinionated EncoderConfig
func Warn ¶
func Warn(msg string, keysAndValues ...interface{})
Warn will accept custom argument pairs that you wish to Log. It will produce a json-encoded string. See: https://godoc.org/go.uber.org/zap
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option overrides behavior of Logger.
func WithExtraFields ¶
WithExtraFields add extra fields to logger.
func WithIsProduction ¶
WithIsProduction defines whether it is prod env.
func WithServiceName ¶
WithServiceName defines optional service name.