Documentation ¶
Index ¶
Constants ¶
View Source
const ( AccessLogFileSize20M int64 = 20 * 1024 * 1024 AccessLogFileSize50M int64 = 50 * 1024 * 1024 AccessLogFileSize200M int64 = 200 * 1024 * 1024 )
Constants
View Source
const ( RecordingTypeFilelog = "filelog" RecordingTypeEFK = "efk" LogRotatorCronDaily = "0 0 0 * * ?" LogRotatorCronWeekly = "0 0 0 ? * 1" LogRotatorCronMonthly = "0 0 0 1 * ?" LogRotatorExpiresMonthly = 30 LogRotatorExpiresWeekly = 7 LogRotatorExpiresSeason = 90 LogRotatorExpiresYearly = 365 )
Constant
Variables ¶
View Source
var ( Trace *log.Logger = log.New(os.Stdout, "[TRACE] ", log.Ldate|log.Ltime|log.Lshortfile) Debug *log.Logger = log.New(os.Stdout, "[DEBUG] ", log.Ldate|log.Ltime|log.Lshortfile) Info *log.Logger = log.New(os.Stdout, "[INFO] ", log.Ldate|log.Ltime|log.Lshortfile) Warning *log.Logger = log.New(os.Stdout, "[WARN] ", log.Ldate|log.Ltime|log.Lshortfile) Error *log.Logger = log.New(io.MultiWriter(os.Stdout, os.Stderr), "[ERROR] ", log.Ldate|log.Ltime|log.Lshortfile) Fatal *log.Logger = log.New(io.MultiWriter(os.Stdout, os.Stderr), "[FATAL] ", log.Ldate|log.Ltime|log.Lshortfile) LogRotatorCrontab string = LogRotatorCronDaily LogRotatorExpiresDays int = LogRotatorExpiresMonthly Level LogLevel = LogLevelDebug )
Variables
View Source
var (
AccessLogFileMaxBytes = AccessLogFileSize20M
)
Variables
Functions ¶
func InitFluentdLogger ¶
InitFluentdLogger logger
func NewAccessLogger ¶
NewAccessLogger logger
Types ¶
Click to show internal directories.
Click to hide internal directories.