[systemd-devel] why log_set_prohibit_ipc() is set in journald

Lennart Poettering lennart at poettering.net
Fri Aug 27 14:33:35 UTC 2021


On Fr, 27.08.21 17:34, Nishant Nayan (nayan.nishant2000 at gmail.com) wrote:

> So then where does journald logs its own messages if he wants to?

Depends, some of them it logs to the journal itself, via
server_driver_message(). But unless explicitly written that way log
messages of the journal go to kmsg.

Things is, if you want to log an error message about your inability to
write a log message you better don't write that as a log message
that will then result in an error, and thus another log message, and
thus another log message and so on,  and thus a cycle. thus by default
all our own log messages to go kmsg, except for a bunch where we know
for sure they aren#t immediate effect of an attempt to write a log
message, and thus won't result in a cycle.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list