Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DebugLogLevel debug DebugLogLevel = "debug" // InfoLogLevel info InfoLogLevel = "info" // WarnLogLevel warn WarnLogLevel = "warn" // ErrorLogLevel error ErrorLogLevel = "error" // FatalLogLevel fatal FatalLogLevel = "fatal" // TextLoggingFormat text log format type TextLoggingFormat = "text" // JSONLoggingFormat json log format type JSONLoggingFormat = "json" // TimestampFormat standard log time format TimestampFormat = "02/Jan/2006:15:04:05 -0700" )
Variables ¶
This section is empty.
Functions ¶
func DeinitializeLogging ¶
func DeinitializeLogging()
DeinitializeLogging cleans up any resources related to logging
func InitLogging ¶
InitLogging initializes logging for the application
func LoggerMiddleware ¶
func LoggerMiddleware() echo.MiddlewareFunc
LoggerMiddleware returns a Logger middleware that will log requests based on if the logRequests config flag is set.
Types ¶
type LogConfig ¶
type LogConfig struct { File string `mapstructure:"file"` Level string `mapstructure:"level"` Format string `mapstructure:"format"` LogRequests bool `mapstructure:"log-requests"` LogStartupInfo bool `mapstructure:"log-startup-info"` }
LogConfig provides configuration for initializing application logging
Click to show internal directories.
Click to hide internal directories.