Documentation ¶
Index ¶
Constants ¶
View Source
const ( //DEBUG is a constant of string type DEBUG = "DEBUG" //INFO is constant for info level log INFO = "INFO" //WARN is constant for warn level log WARN = "WARN" //ERROR is constant for error level log ERROR = "ERROR" //FATAL is constant for fail level log FATAL = "FATAL" )
Variables ¶
View Source
var Writers = make(map[string]io.Writer)
Writers is a map
Functions ¶
func NewLoggerExt ¶
NewLoggerExt is a function which is used to write new logs
func RegisterWriter ¶
RegisterWriter is used to register a io writer
Types ¶
type Config ¶
type Config struct { LoggerLevel string `yaml:"loggerLevel"` LoggerFile string `yaml:"loggerFile"` Writers []string `yaml:"writers"` LogFormatText bool `yaml:"logFormatText"` //for rotate RotateDisable bool `yaml:"rotateDisable"` MaxSize int `yaml:"maxSize"` MaxAge int `yaml:"maxAge"` MaxBackups int `yaml:"maxBackups"` Compress bool `yaml:"compress"` }
Config is a struct which stores details for maintaining logs
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig is a function which retuns config object with default configuration
Click to show internal directories.
Click to hide internal directories.