Back to godoc.org

Package log

v0.4.14
Latest Go to latest

The latest major version is .

Published: Jul 13, 2020 | License: Apache-2.0 | Module: github.com/criticalstack/e2d

Overview

nolint:errcheck

Index

Variables

var ErrUnsupportedValueType = errors.New("unsupported value type")

func CapitalColorFullNameEncoder

func CapitalColorFullNameEncoder(loggerName string, enc zapcore.PrimitiveArrayEncoder)

CapitalColorFullNameEncoder serializes the logger name to an all-caps string and adds color. For example, gossip is serialized to "GOSSIP" and colored white.

func CapitalFullNameEncoder

func CapitalFullNameEncoder(loggerName string, enc zapcore.PrimitiveArrayEncoder)

CapitalFullNameEncoder serializes the logger name to an all-caps string. For example, gossip is serialized to "GOSSIP".

func ColorEpochTimeEncoder

func ColorEpochTimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)

ColorEpochTimeEncoder serializes a time.Time to an integer representing the number of seconds since the Unix epoch and adds color.

func Debug

func Debug(msg string, fields ...zapcore.Field)

func Debugf

func Debugf(format string, args ...interface{})

func EpochTimeEncoder

func EpochTimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)

EpochTimeEncoder serializes a time.Time to an integer representing the number of seconds since the Unix epoch.

func Error

func Error(msg string, fields ...zapcore.Field)

func Errorf

func Errorf(format string, args ...interface{})

func Fatal

func Fatal(msg interface{}, fields ...zapcore.Field)

func Fatalf

func Fatalf(format string, args ...interface{})

func Info

func Info(msg string, fields ...zapcore.Field)

func Infof

func Infof(format string, args ...interface{})

func NewDefaultEncoderConfig

func NewDefaultEncoderConfig() zapcore.EncoderConfig

func NewEncoder

func NewEncoder(cfg zapcore.EncoderConfig) zapcore.Encoder

func NewLogger

func NewLogger(ns string) *zap.Logger

NewLogger creates a new child logger with the provided namespace.

func NewLoggerWithLevel

func NewLoggerWithLevel(ns string, lvl zapcore.Level) *zap.Logger

NewLogger creates a new child logger with the provided namespace and level. Since this specifies a level, it overrides the global package level for this child logger only.

func SetLevel

func SetLevel(lvl zapcore.Level)

func Warn

func Warn(msg string, fields ...zapcore.Field)

func Warnf

func Warnf(format string, args ...interface{})
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier