log

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Caller added in v0.3.8

func Caller(depth int) string

Caller fetches the calling function name, skipping 'depth'. Results are cached per PC.

func Debug added in v0.3.8

func Debug(a ...interface{})

func Debugf added in v0.3.8

func Debugf(s string, a ...interface{})

func EnableSyslog added in v0.3.8

func EnableSyslog(proto, addr string) error

EnableSyslog will enabling logging to the syslog at given address.

func Error added in v0.3.8

func Error(a ...interface{})

func Errorf added in v0.3.8

func Errorf(s string, a ...interface{})

func Fatal added in v0.3.8

func Fatal(a ...interface{})

func Fatalf added in v0.3.8

func Fatalf(s string, a ...interface{})

func Info added in v0.3.8

func Info(a ...interface{})

func Infof added in v0.3.8

func Infof(s string, a ...interface{})

func Level added in v0.3.8

func Level() level.LEVEL

Level returns the currently set log level.

func Log added in v0.3.8

func Log(lvl level.LEVEL, a ...interface{})

Log will log formatted args as 'msg' field to the log at given level.

func Logf added in v0.3.8

func Logf(lvl level.LEVEL, s string, a ...interface{})

Logf will log format string as 'msg' field to the log at given level.

func Panic added in v0.3.8

func Panic(a ...interface{})

func Panicf added in v0.3.8

func Panicf(s string, a ...interface{})

func ParseLevel added in v0.3.8

func ParseLevel(str string) error

ParseLevel will parse the log level from given string and set to appropriate level.

func Print added in v0.3.8

func Print(a ...interface{})

Print will log formatted args to the stdout log output.

func Printf added in v0.3.8

func Printf(s string, a ...interface{})

Print will log format string to the stdout log output.

func SetLevel added in v0.3.8

func SetLevel(lvl level.LEVEL)

SetLevel sets the max logging level.

func Trace added in v0.3.8

func Trace(a ...interface{})

func Tracef added in v0.3.8

func Tracef(s string, a ...interface{})

func Warn added in v0.3.8

func Warn(a ...interface{})

func Warnf added in v0.3.8

func Warnf(s string, a ...interface{})

Types

type Entry added in v0.3.8

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

func New added in v0.6.0

func New() Entry

New starts a new log entry.

func WithField added in v0.3.8

func WithField(key string, value interface{}) Entry

func WithFields added in v0.3.8

func WithFields(fields ...kv.Field) Entry

func (Entry) Debug added in v0.3.8

func (e Entry) Debug(a ...interface{})

func (Entry) Debugf added in v0.3.8

func (e Entry) Debugf(s string, a ...interface{})

func (Entry) Error added in v0.3.8

func (e Entry) Error(a ...interface{})

func (Entry) Errorf added in v0.3.8

func (e Entry) Errorf(s string, a ...interface{})

func (Entry) Fatal added in v0.3.8

func (e Entry) Fatal(a ...interface{})

func (Entry) Fatalf added in v0.3.8

func (e Entry) Fatalf(s string, a ...interface{})

func (Entry) Info added in v0.3.8

func (e Entry) Info(a ...interface{})

func (Entry) Infof added in v0.3.8

func (e Entry) Infof(s string, a ...interface{})

func (Entry) Log added in v0.3.8

func (e Entry) Log(lvl level.LEVEL, a ...interface{})

func (Entry) Logf added in v0.3.8

func (e Entry) Logf(lvl level.LEVEL, s string, a ...interface{})

func (Entry) Panic added in v0.3.8

func (e Entry) Panic(a ...interface{})

func (Entry) Panicf added in v0.3.8

func (e Entry) Panicf(s string, a ...interface{})

func (Entry) Print added in v0.3.8

func (e Entry) Print(a ...interface{})

func (Entry) Printf added in v0.3.8

func (e Entry) Printf(s string, a ...interface{})

func (Entry) Trace added in v0.3.8

func (e Entry) Trace(a ...interface{})

func (Entry) Tracef added in v0.3.8

func (e Entry) Tracef(s string, a ...interface{})

func (Entry) Warn added in v0.3.8

func (e Entry) Warn(a ...interface{})

func (Entry) Warnf added in v0.3.8

func (e Entry) Warnf(s string, a ...interface{})

func (Entry) WithField added in v0.3.8

func (e Entry) WithField(key string, value interface{}) Entry

func (Entry) WithFields added in v0.3.8

func (e Entry) WithFields(fields ...kv.Field) Entry

Jump to

Keyboard shortcuts

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