natefinch / lumberjack

lumberjack is a log rolling package for Go
MIT License
4.79k stars 591 forks source link

Want New Options: do not delete log files when reach MaxAge but not reach MaxeBackups #66

Closed vikyd closed 6 years ago

vikyd commented 6 years ago

settings:

FileName:    "t.log",
MaxAge:      7,
MaxBackups:  3,

my log files:

t-2018-09-03T00-00-00.00.log
t-2018-08-20T00-00-00.00.log

current time:

2018-09-04

I don't want to delete the second log file t-2018-08-20T00-00-00.00.log, because there are not too many files.

If there an option to archive it, it will be nice.

xiegeo commented 6 years ago

Shouldn't increase MaxAge work for you?

vikyd commented 6 years ago

@xiegeo Yes!