Documentation
¶
Overview ¶
Package timber contains logging utilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanLogDir ¶
CleanLogDir removes old log entries to keep the directory clean. keepEntries specifies the number of entries to keep; 0 means all entries.
func ComponentLogger ¶
ComponentLogger returns a logger with a pre-configured "component" field. Used to have consistent fields across the various structs that need logging.
func CreateLogger ¶
CreateLogger returns a zerolog.Logger writing to a log file and stderr, along with a cleanup function to close the underlying log file.
func OpenLogFile ¶
func OpenLogFile() (io.WriteCloser, error)
OpenLogFile opens the log file for writing.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.