Documentation
¶
Overview ¶
kttlog is the package specifying logging information used throughout the ecosystem. It contains helper functions to make management of logging easier.
Index ¶
- Variables
- func AddHook(hook zerolog.Hook)
- func AddWriter(w io.Writer)
- func EnableConsoleLog()
- func EnableFileLog(path string) error
- func EnableLocalSyslog() error
- func EnableNetworkSyslog(network, addr string) error
- func RebuildLogger()
- func ResetLogger()
- func SetKTTLogger(l zerolog.Logger)
- func SetLevel(level zerolog.Level)
- func SetLevelStr(level string)
Constants ¶
This section is empty.
Variables ¶
var Logger *zerolog.Logger
Functions ¶
func EnableConsoleLog ¶
func EnableConsoleLog()
EnableConsoleLog enables the console logger (this is enabled by default, but is disabled if ResetLogger is called)
func EnableFileLog ¶
EnableFileLog enables the file logger and sets the log file to the given path
func EnableLocalSyslog ¶
func EnableLocalSyslog() error
EnableLocalSyslog enables the local syslog logger, according to the native syslog package
func EnableNetworkSyslog ¶
EnableNetworkSyslog enables the network syslog logger and sets the syslog server to the given host:port
func RebuildLogger ¶
func RebuildLogger()
RebuildLogger rebuilds the logger with the current list of writers and hooks
func ResetLogger ¶
func ResetLogger()
ResetLogger resets the logger to the default zerolog.Logger, removing all writers and hooks
func SetKTTLogger ¶
SetKTTLogger sets the logger to the given zerolog.Logger struct
Types ¶
This section is empty.