Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BaseLogger *logrus.Logger
View Source
var Log *logrus.Entry
Log is the global logger
Functions ¶
func InitLogger ¶
func InitLogger(cfg LoggingConfig)
InitLogger Initialize a new logger and set it as the global logger
func InitMiniLogger ¶ added in v0.15.0
func InitMiniLogger(debug bool)
InitMiniLogger Initialize a new logger with minimal configuration
Types ¶
type LoggingConfig ¶
type LoggingConfig struct { Debug bool // if true, log level will be set to DEBUG Logfile string // empty to disable logfile MaxSize int // rotate after x MB filesize MaxAge int // rotate evey x days Backup int // number of backups to keep PTLogLevel string // <DEBUG|INFO|WARNING|ERROR> or empty to disable PT logging PTAppName string // if empty name of executable will be used PTSourceHost string // Which host should be shown in PaperTrail PTHost string // PaperTrail host PTPort int // PaperTrail port FieldsOrder []string // order of fields in log output }
LoggingConfig represents the configuration for the logging mechanism of the application.
Click to show internal directories.
Click to hide internal directories.