Closed UweKeim closed 6 years ago
You could easily setup log rotation on a system level. Probably the cleanest way to do it either way.
At the moment it is not supported though as this logger is intended as an extremely lightweight logger when you compare it to other loggers that are out there. Not sure what @katzgrau thinks about introducing such functionality?
Thanks., I need to do it from PHP only. Probably will add some custom routine in my code to do so.
May I ask why? I'm assuming you'll have the possibility of setting logrotate on the machine/vm you'll be running your stuff from?
Sure. We do use KLogger inside or (German only) CMS where users simply deploy their website via a simple button click to their system (FTPS/SFTP).
Zero configuration on the underling system should be required.
It should be quite easy to follow up an instance of Klogger with something like: rotate (I'm not working with PHP anymore so I can't give you my experience but it seems to suit your needs.
That looks awesome, thanks a lot!
Is it possible to automatically configure KLogger to rotate log files?
E.g.