Documentation
¶
Overview ¶
* This is the logging setup for ttxt: * - Uses zerolog for logging * - Uses console writer for human-readable output * - Maps command line flags to log levels: * - -v: Info * - -vv: Debug * - -vvv: Trace * - Level Guideline: * - Warn: is the default level. * - Info: short messages signaling entry / exit of relevant execution points. * may include some details about the execution, but not significant * amount of data * - Debug: detailed messages for debugging, which include some data. * - Trace: very detailed messages for debugging, which include quiet a bit * of data. * - The core idea is : * what's going on? info. * what is this returning that? debug. * what is happening to this variable? trace.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTestLogger ¶
NewTestLogger creates a logger for testing that integrates with Go's testing framework
Types ¶
type Config ¶
Config holds the logging configuration
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns the default logging configuration
type LogLevel ¶
type LogLevel int
LogLevel represents the available log levels
func ParseVerbosityFlags ¶
ParseVerbosityFlags converts CLI verbosity flags to LogLevel
func (LogLevel) ToZerologLevel ¶
ToZerologLevel converts our LogLevel to zerolog.Level