Documentation ¶
Index ¶
Constants ¶
View Source
const (
// AppName holds the name of this application
AppName = "CPMA"
)
Variables ¶
View Source
var ( // ConfigFile - keeps full path to the configuration file ConfigFile string )
Functions ¶
func NewLogFileHook ¶
func NewLogFileHook(config LogFileConfig) (logrus.Hook, error)
NewLogFileHook instantiates hook and implements Hook interface
Types ¶
type LogFileConfig ¶
type LogFileConfig struct { Filename string MaxSize int Level logrus.Level Formatter logrus.Formatter }
LogFileConfig keeps configuration settings required for lumberjack
type LogFileHook ¶
type LogFileHook struct { Config LogFileConfig // contains filtered or unexported fields }
LogFileHook structure implements logfile hook for logrus
func (*LogFileHook) Fire ¶
func (hook *LogFileHook) Fire(entry *logrus.Entry) (err error)
Fire implements actual write()
func (*LogFileHook) Levels ¶
func (hook *LogFileHook) Levels() []logrus.Level
Levels defines and returns the log levels under which logrus fires the "Fire"
Click to show internal directories.
Click to hide internal directories.