#1 2020-08-10 14:57:43

dexter
Member
Registered: 2015-04-24
Posts: 53

Continue log until rotation on app restart

Hi,

I have set the following rotation params:

    RotateFileDailyAtHour := 0;
    RotateFileCount := 7;

On app restart the "main" log is rewritten from scratch, so I loose my last logs.
Would be nice on application restart to continue writing to current log file (if it exists) until it reaches the rotation event (in my case midnight).
Or, maybe, there is such an option and I couldn't find it?

Another feature "request", if I may smile
Would be nice to have an option to keep rotated files uncompressed (i.e. raw format, not .synlz) without writing my own OnRotate event, for ex. as a property with default value true:

property CompressRotatedFiles: boolean read FCompressRotatedFiles write FCompressRotatedFiles;

If false - just don't call FileSynLZ() and don't append '.synlz' extension.
It's useful when looking for some specific log entry and don't have to UnSynLz all files.

Thanks.

Offline

#2 2020-08-10 15:11:18

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: Continue log until rotation on app restart

About point 1, with plain rotation Family.FileExistsAction=acAppend so it should be the case.

For point 2, please check https://synopse.info/fossil/info/d904f41656

Online

#3 2020-08-10 15:21:22

dexter
Member
Registered: 2015-04-24
Posts: 53

Re: Continue log until rotation on app restart

That was quick!

Thanks Arnaud, looks ok for me.

Offline

Board footer

Powered by FluxBB