winstonjs / winston-daily-rotate-file

A transport for winston which logs to a rotating file each day.
MIT License
889 stars 151 forks source link

not creating a directory or file when no logs happened #393

Open pdeveltere opened 1 month ago

pdeveltere commented 1 month ago

the library creates a directory and log file before anything is logged. So it could happen that an empty log file is created, when nothing is logged during a day, when the pattern is access-%DATE%.log

Perhaps we can change the logic so the directory and filename is only created during the first log?