Thanks for the pointer. Yes, I was writing to stdout. I didn't know
about PHP's syslog call
(http://php.net/manual/en/function.syslog.php) which produces output
that goes to systemd log and can be manipulated with journalctl.
That should solve my problem. On 06/09/17 15:29, Yedidyah Bar David
wrote:
On Sun, Sep 3, 2017 at 6:44 PM, David Suna <da...@davidsconsultants.com> wrote:I am getting started with systemd on an Ubuntu 16.04 system. I have a custom service implemented in PHP which is outputting messagesHow? Writing to stdout?which I can see using journalctl. I would like to be able to filter on the message priority to distinguish between error messages and debug messages. However, all of my messages seem to be showing as info messages. How can I format my messages so that they will fit into the different log levels?I think you should use syslog, and/or systemd-/journald-specific means, e.g.: https://github.com/systemd/php-systemd Best, -- David Suna da...@davidsconsultants.com |
_______________________________________________ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il