You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
found that the log file can't roate to another file, ex: system.log, when maxsize will not to change to system.log.1.
code:
lvl := log4go.INFO
switch CFG.UString("log.level", "INFO") {
case "DEBUG":
lvl = log4go.DEBUG
case "INFO":
lvl = log4go.INFO
case "WARNING":
lvl = log4go.WARNING
case "ERROR":
lvl = log4go.ERROR
case "CRITICAL":
lvl = log4go.CRITICAL
default:
lvl = log4go.INFO
}
LOG.AddFilter("stdout", lvl, log4go.NewConsoleLogWriter())
logWriter := log4go.NewFileLogWriter("system.log", true, true)
logWriter.SetRotateSize(10)
logWriter.SetRotateLines(1000)
LOG.AddFilter("log", lvl, logWriter)
The text was updated successfully, but these errors were encountered:
found that the log file can't roate to another file, ex: system.log, when maxsize will not to change to system.log.1.
code:
lvl := log4go.INFO
switch CFG.UString("log.level", "INFO") {
case "DEBUG":
lvl = log4go.DEBUG
case "INFO":
lvl = log4go.INFO
case "WARNING":
lvl = log4go.WARNING
case "ERROR":
lvl = log4go.ERROR
case "CRITICAL":
lvl = log4go.CRITICAL
default:
lvl = log4go.INFO
}
LOG.AddFilter("stdout", lvl, log4go.NewConsoleLogWriter())
logWriter := log4go.NewFileLogWriter("system.log", true, true)
logWriter.SetRotateSize(10)
logWriter.SetRotateLines(1000)
LOG.AddFilter("log", lvl, logWriter)
The text was updated successfully, but these errors were encountered: