Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsProvided ¶
func IsProvided(l OptionalLogger) bool
IsProvided returns true if l.OptionalLogger is not nil
Types ¶
type Config ¶
type Config struct {
Prefix string `yaml:"prefix"`
}
Config holds log configuration
func LoadConfig ¶
func LoadConfig(params LoadConfigParams) (Config, error)
LoadConfig create a new *Config and populate it with values from environment.
type LoadConfigParams ¶
type LoggerMapping ¶
func NewLogger ¶
func NewLogger(config Config) LoggerMapping
NewLogger returns a new logger configured with values from *Config.
type OptionalLogger ¶
OptionalLogger holds the injected and named 'x_logger' *log.Logger. Keep in mind that as it is a optional dependency, it can be nil. There is a helper method IsProvided in this same package that you can check if the value was provided or not.
Click to show internal directories.
Click to hide internal directories.