ayacoo / typo3-logrotate

Custom LogWriter example with LogRotate from Monolog
1 stars 0 forks source link

11/12 LTS #5

Open dennismetz opened 1 year ago

dennismetz commented 1 year ago

I have adapted the whole thing for the 11s according to the instructions - has also worked great. What I noticed, however, is that the standard log file is still present.

Means, I have e.g. the following files: typo3_hash.log typo3_hash-date1234.log typo3_hash-date2345.log ...

Do I need to disable the log?

ayacoo commented 1 year ago

I'm glad it helped you.

As far as I can remember, the base file was always needed so that the RotatingFileHandler knew which file it was. =>https://github.com/Seldaek/monolog/blob/main/src/Monolog/Handler/RotatingFileHandler.php

Otherwise, you can try commenting out the createLogFile method and see what happens ;-) But I suppose it is still needed as a basis. https://github.com/ayacoo/typo3-logrotate/blob/master/Classes/Writer/CustomWriter.php#L188

Is the log filled or is it just empty?

dennismetz commented 1 year ago

Hi, sorry for the really late reply. The log is filled and still contains all data because it is not yet automatically deleted/emptied. So you have the overview of the last days in the smaller logs, but the main log becomes partly huge.

Do you have any ideas for that? CronJob to empty/delete the main log regularly?

ayacoo commented 1 year ago

@dennismetz Can you please provide your current state once as a fork or repo? Then I would have a look at it.