exilon / QuickLogger

Powerful and flexible library for logging on files, console, memory, email, rest, eventlog, syslog, slack, telegram, redis, logstash, elasticsearch, influxdb, graylog, Sentry, Twilio, ide debug messages and throw events for Delphi/Firemonkey/freepascal/.NET (Windows/Linux/OSX/IOS/Android).
Apache License 2.0
381 stars 84 forks source link

Error on CompressLogFile #99

Open fintechyazilim opened 1 year ago

fintechyazilim commented 1 year ago

Hi, If you give DailyRotateFileDateFormat and set the DailyRotate = True the function of CompressLogFile thows an exception. Because GetLogFileBackup parameter is True therefor GetLogFileBackup function returns empty result. (There is no zip file yet in the directory) zip.Open(GetLogFileBackup(1,True),zmWrite);

Can you please check this line of the code?

etc: i have changed the code like this. zipfile := GetLogFileBackup(1, False); if zipfile.IsEmpty then Exit else zipfile := zipfile + '.zip'; Zip.Open(zipfile, zmWrite);

Thank you.

exilon commented 1 week ago

Yes, I see. It's a bug. I'll fix.