package config import "github.com/natefinch/lumberjack" var ( _loggerConfig *LoggerConfig ) type LoggerConfig struct { Level string `yaml:"level,omitempty"` Lumberjack *lumberjack.Logger `yaml:"lumberjack,omitempty"` } func InitLogger(path string) { var config LoggerConfig readConfig(path, &config) _loggerConfig = &config } func GetLoggerConfig() LoggerConfig { return *_loggerConfig }