auto delete logs after x days
parent
a0796b9cb2
commit
7ce675cec5
|
@ -173,7 +173,6 @@ func StartBackgroundLogDeleter() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func CheckForDeletableLogs() {
|
func CheckForDeletableLogs() {
|
||||||
|
|
||||||
daysToKeepLogs := config.Cfg.DaysToKeepLogs
|
daysToKeepLogs := config.Cfg.DaysToKeepLogs
|
||||||
|
|
||||||
logFolder := config.Cfg.LogFolder
|
logFolder := config.Cfg.LogFolder
|
||||||
|
@ -184,7 +183,6 @@ func CheckForDeletableLogs() {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if !info.IsDir() {
|
if !info.IsDir() {
|
||||||
// check if the file is older than the daysToKeepLogs
|
// check if the file is older than the daysToKeepLogs
|
||||||
// get the date from the file name
|
// get the date from the file name
|
||||||
|
|
Loading…
Reference in New Issue