I wants to listen to remote journal logs ( logs which we receive from
another machine, using systemd-journal-remote) and take some action
accordingly. For that I wrote a small application which opens remote
journal directory (sd_journal_open_directory
(j,"/var/log/journal/remote/",0) and parse through all the logs using
sd_journal_next() and whenever sd_journal_next returns 0 (no new logs), I
wait on sd_journal_wait().

I ran this process as root, sd_journal_wait() wakes up whenever journal
remote receives new logs but sd_journal_next always returns 0. But
journalctl works, it could able to read.

If I stop systemd-journal-remote and restart my application, My application
works properly, it reads all the logs properly.
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to