Documentation ¶
Overview ¶
Package lager is the package for lager
Index ¶
- Constants
- Variables
- func CopyFile(srcFile, destFile string) error
- func EscapPath(msg string) string
- func FilterFileList(path, pat string) ([]string, error)
- func Initialize(writers, loggerLevel, loggerFile, rollingPolicy string, logFormatText bool, ...)
- func LogRotate(path string, MaxFileSize int, MaxBackupCount int)
- type Lager
Constants ¶
View Source
const ( LogRotateDate = 1 LogRotateSize = 10 LogBackupCount = 7 RollingPolicySize = "size" )
constant values for logrotate parameters
Variables ¶
View Source
var Logger lager.Logger
Logger is the global variable for the object of lager.Logger
Functions ¶
func FilterFileList ¶
FilterFileList function for filter file list path : where the file will be filtered pat : regexp pattern to filter the matched file
func Initialize ¶
func Initialize(writers, loggerLevel, loggerFile, rollingPolicy string, logFormatText bool, LogRotateDate, LogRotateSize, LogBackupCount int)
Initialize Build constructs a *Lager.Logger with the configured parameters.
Types ¶
type Lager ¶
type Lager struct { Writers string `yaml:"writers"` LoggerLevel string `yaml:"logger_level"` LoggerFile string `yaml:"logger_file"` LogFormatText bool `yaml:"log_format_text"` RollingPolicy string `yaml:"rollingPolicy"` LogRotateDate int `yaml:"log_rotate_date"` LogRotateSize int `yaml:"log_rotate_size"` LogBackupCount int `yaml:"log_backup_count"` }
Lager struct for logger parameters
Click to show internal directories.
Click to hide internal directories.