natefinch / lumberjack

lumberjack is a log rolling package for Go
MIT License
4.81k stars 593 forks source link

Optimization suggestions #194

Open cuican6 opened 11 months ago

cuican6 commented 11 months ago

Referring to nlog, when generating logs, they can be dynamically written to different files based on time.

First, when writing to the log, determine the current date and update the date to form a name name in log.FileName. After writing the date, determine whether the current open file is consistent with FileName. If not, open a file with a new name and write it to the log

cuican6 commented 11 months ago

image