logging

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLogging

func InitLogging(loglevel string, console bool)

Types

type Event

type Event struct {
	*zerolog.Event
}

Event is a wrapper around Event from github.com/rs/zerolog. The methods implemented for this wrapper represent the subset of Zerolog methods that we anticipate actually using. This might be expanded in the future.

func Debug

func Debug() *Event

Debug is a wrapper around log.Debug() from github.com/rs/zerolog/log.

func Error

func Error() *Event

Error is a wrapper around log.Error() from github.com/rs/zerolog/log.

func Fatal

func Fatal() *Event

Fatal is a wrapper around log.Fatal() from github.com/rs/zerolog/log.

func Info

func Info() *Event

Info is a wrapper around log.Info() from github.com/rs/zerolog/log.

func Panic

func Panic() *Event

Panic is a wrapper around log.Panic() from github.com/rs/zerolog/log.

func Trace

func Trace() *Event

Trace is a wrapper around log.Trace() from github.com/rs/zerolog/log.

func Warn

func Warn() *Event

Warn is a wrapper around log.Warn() from github.com/rs/zerolog/log.

func (*Event) AnErr

func (e *Event) AnErr(key string, err error) *Event

func (*Event) Bool

func (e *Event) Bool(key string, b bool) *Event

func (*Event) Bools

func (e *Event) Bools(key string, b []bool) *Event

func (*Event) Bytes

func (e *Event) Bytes(key string, val []byte) *Event

func (*Event) Dur

func (e *Event) Dur(key string, d time.Duration) *Event

func (*Event) Durs

func (e *Event) Durs(key string, d []time.Duration) *Event

func (*Event) Err

func (e *Event) Err(err error) *Event

func (*Event) Errs

func (e *Event) Errs(key string, err []error) *Event

func (*Event) Float32

func (e *Event) Float32(key string, f float32) *Event

func (*Event) Float64

func (e *Event) Float64(key string, f float64) *Event

func (*Event) Floats32

func (e *Event) Floats32(key string, f []float32) *Event

func (*Event) Floats64

func (e *Event) Floats64(key string, f []float64) *Event

func (*Event) Hex

func (e *Event) Hex(key string, val []byte) *Event

func (*Event) IPAddr

func (e *Event) IPAddr(key string, ip net.IP) *Event

func (*Event) IPPrefix

func (e *Event) IPPrefix(key string, pfx net.IPNet) *Event

func (*Event) Int

func (e *Event) Int(key string, i int) *Event

func (*Event) Int16

func (e *Event) Int16(key string, i int16) *Event

func (*Event) Int32

func (e *Event) Int32(key string, i int32) *Event

func (*Event) Int64

func (e *Event) Int64(key string, i int64) *Event

func (*Event) Int8

func (e *Event) Int8(key string, i int8) *Event

func (*Event) Ints

func (e *Event) Ints(key string, i []int) *Event

func (*Event) Ints16

func (e *Event) Ints16(key string, i []int16) *Event

func (*Event) Ints32

func (e *Event) Ints32(key string, i []int32) *Event

func (*Event) Ints64

func (e *Event) Ints64(key string, i []int64) *Event

func (*Event) Ints8

func (e *Event) Ints8(key string, i []int8) *Event

func (*Event) MACAddr

func (e *Event) MACAddr(key string, ha net.HardwareAddr) *Event

func (*Event) Msg

func (e *Event) Msg(msg string)

func (*Event) Msgf

func (e *Event) Msgf(format string, v ...interface{})

func (*Event) RawJSON

func (e *Event) RawJSON(key string, b []byte) *Event

func (*Event) Send

func (e *Event) Send()

func (*Event) Str

func (e *Event) Str(key string, s string) *Event

func (*Event) Stringer

func (e *Event) Stringer(key string, val fmt.Stringer) *Event

func (*Event) Stringers

func (e *Event) Stringers(key string, vals []fmt.Stringer) *Event

func (*Event) Strs

func (e *Event) Strs(key string, vals []string) *Event

func (*Event) Time

func (e *Event) Time(key string, t time.Time) *Event

func (*Event) TimeDiff

func (e *Event) TimeDiff(key string, t time.Time, start time.Time) *Event

func (*Event) Times

func (e *Event) Times(key string, t []time.Time) *Event

func (*Event) Timestamp

func (e *Event) Timestamp() *Event

func (*Event) Uint

func (e *Event) Uint(key string, i uint) *Event

func (*Event) Uint16

func (e *Event) Uint16(key string, i uint16) *Event

func (*Event) Uint32

func (e *Event) Uint32(key string, i uint32) *Event

func (*Event) Uint64

func (e *Event) Uint64(key string, i uint64) *Event

func (*Event) Uint8

func (e *Event) Uint8(key string, i uint8) *Event

func (*Event) Uints

func (e *Event) Uints(key string, i []uint) *Event

func (*Event) Uints16

func (e *Event) Uints16(key string, i []uint16) *Event

func (*Event) Uints32

func (e *Event) Uints32(key string, i []uint32) *Event

func (*Event) Uints64

func (e *Event) Uints64(key string, i []uint64) *Event

func (*Event) Uints8

func (e *Event) Uints8(key string, i []uint8) *Event

type Logger

type Logger struct{}

Logger is, currently, a placeholder object. For now, there is no difference between Logger.LvlFunc() and logging.LvlFunc(). This might change if we start configuring subloggers.

func (*Logger) Debug

func (l *Logger) Debug() *Event

func (*Logger) Error

func (l *Logger) Error() *Event

func (*Logger) Fatal

func (l *Logger) Fatal() *Event

func (*Logger) Info

func (l *Logger) Info() *Event

func (*Logger) Panic

func (l *Logger) Panic() *Event

func (*Logger) Trace

func (l *Logger) Trace() *Event

func (*Logger) Warn

func (l *Logger) Warn() *Event

Jump to

Keyboard shortcuts

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