Documentation ¶
Index ¶
Constants ¶
View Source
const ( JSONFormat = "json" TextFormat = "text" )
The log format can either be text or JSON.
View Source
const ( NamedFxSetupConfig = "logger.FxSetupConfig" NamedConfig = "logger.Config" )
Variables ¶
View Source
var ( DefaultConfig = &Config{ Level: "info", Format: JSONFormat, Caller: false, } DebugTextConfig = &Config{ Level: "debug", Format: TextFormat, Caller: true, } )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Level string `default:"info"` Format string `default:"json"` Caller bool `default:"false"` }
Config stores the config for the logger.
func (*Config) WithCaller ¶
WithCaller returns a new config with overridden value.
func (*Config) WithFormatJSON ¶
WithFormat returns a new config with overridden value.
func (*Config) WithFormatText ¶
WithFormat returns a new config with overridden value.
Click to show internal directories.
Click to hide internal directories.