log

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteString

func ByteString(key string, val []byte) zapcore.Field

ByteString construct zapcore.Field that caries hex encoded data as []byte.

func MultiLine

func MultiLine(key, val string) zapcore.Field

MultiLine construct zapcore.Field that caries a multi line string.

Types

type Config

type Config struct {
	Level  string
	Format string
}

func (*Config) Build

func (conf *Config) Build() (*Logger, error)

func (*Config) RegisterFlags

func (conf *Config) RegisterFlags(f *flag.FlagSet)

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func New

func New(log *zap.Logger) *Logger

func NewNop

func NewNop() *Logger

func (*Logger) Debugw

func (logger *Logger) Debugw(msg string, pairs ...interface{})

func (*Logger) Errorw

func (logger *Logger) Errorw(msg string, pairs ...interface{})

func (*Logger) Infow

func (logger *Logger) Infow(msg string, pairs ...interface{})

func (*Logger) With

func (logger *Logger) With(args ...interface{}) *Logger

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL