Documentation ¶
Index ¶
- Constants
- Variables
- func Cli()
- func Ctx(ctx context.Context) *zerolog.Logger
- func Debug() *zerolog.Event
- func Discard()
- func Err(err error) *zerolog.Event
- func Error(errs ...error) *zerolog.Event
- func Fatal(errs ...error) *zerolog.Event
- func Hook(h zerolog.Hook) zerolog.Logger
- func Info() *zerolog.Event
- func Level(level zerolog.Level) zerolog.Logger
- func Log() *zerolog.Event
- func Output(w io.Writer)
- func Panic() *zerolog.Event
- func Pretty()
- func Print(v ...interface{})
- func Printf(format string, v ...interface{})
- func Sample(s zerolog.Sampler) zerolog.Logger
- func Warn() *zerolog.Event
- func With() zerolog.Context
- func WithLevel(level zerolog.Level) *zerolog.Event
Constants ¶
const ( // evironment variable for log output // examples: // - default structured to stderr // pretty - console pretty printed to stderr // unix - unix domain socket, as defined in: https://golang.org/src/log/syslog/syslog_unix.go // udp://localhost:514 - syslog udp location // tcp://host:port - syslog tcp location EnvSyslog = "KIT_LOG_OUTPUT" )
Variables ¶
var Logger zerolog.Logger
Functions ¶
func Ctx ¶
Ctx returns the Logger associated with the ctx. If no logger is associated, a disabled logger is returned.
func Debug ¶
Debug starts a new message with debug level.
You must call Msg on the returned event in order to send the event.
func Info ¶
Info starts a new message with info level.
You must call Msg on the returned event in order to send the event.
func Log ¶
Log starts a new message with no level. Setting zerolog.GlobalLevel to zerolog.Disabled will still disable events produced by this method.
You must call Msg on the returned event in order to send the event.
func Panic ¶
Panic starts a new message with panic level. The message is also sent to the panic function.
You must call Msg on the returned event in order to send the event.
func Print ¶
func Print(v ...interface{})
Print sends a log event using debug level and no extra field. Arguments are handled in the manner of fmt.Print.
func Printf ¶
func Printf(format string, v ...interface{})
Printf sends a log event using debug level and no extra field. Arguments are handled in the manner of fmt.Printf.
func Warn ¶
Warn starts a new message with warn level.
You must call Msg on the returned event in order to send the event.
Types ¶
This section is empty.