Closed dhoffend closed 8 years ago
I would prefer to use SysLog so that Statusengine don't need to take care about log rotation and stuff like this. And i like to replace LogfileTask with CakeLog class
Now the error output is back on stderr: And all errors get logged to syslog:
Same for notices:
I changed syslog tag from Statusengine to statusengine so it's easy to grep for it. (After i took the screenshots...)
In the next step i will remove the LogfileTask. See: 51db9b6ab627e66c64bf4f1eb46e9699bdc83bde
Sounds great
Hi @dhoffend, syslog support is done. Please checkout 38b360c94f544a62aa031ec4edeb51780447ea53 to see if it fits your needs...
Merged into new Version 1.6.0
I've realized different things with the logging of statusengine cakephp application
1) The LegacyShell Daemon uses a hardcoded file handler to write the output to
2) The current hardcoded file handler logging doesn't log any timestamps in the logfile which makes it harder to analyse future possible problems or crashes.
3) The current code doesn't support logfile rotation. StatusengineLegacyShell.php could reopen (close/open) the logfile on SIGHUP or similar to support log rotation.
4) CakePHP provides a generic LogHandlerInterface which supports file, syslog and other handler. Is there a reason for not using the generic logging interface instead of fopen/fwrite? With generic logging and syslog you would tackle the logrotation problem also since logrotation can be taken care on the syslog server, etc