Documentation ¶
Overview ¶
Package logger is responsible for logging.
Index ¶
Constants ¶
View Source
const (
// FieldCtx is a key of logged context
FieldCtx = "ctx"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // Level sets the minimal logging level // values: debug, info (default), warn, warning, error, fatal, panic Level LogLevel `envconfig:"default=info"` // BuildHash holds hash of the git commit from which binary was build. BuildHash string `envconfig:"-"` }
Config is responsible for configuring logger.
type LogLevel ¶
LogLevel is a config field type holding minimal log level. It's compatible with logrus level types.
type THTimeForcedFormatter ¶
type THTimeForcedFormatter struct { // OrigFormatter is an original formatter OrigFormatter logrus.Formatter // Time is a time to be forces in entries. Time time.Time }
THTimeForcedFormatter is a Logrus compatible formatter which wraps original formatter and forces specific time. Designed to be used in testing.
Click to show internal directories.
Click to hide internal directories.