]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/login/logind-dbus.c
logind: log wall messages to the journal
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 30 Jun 2022 10:13:49 +0000 (12:13 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 30 Jun 2022 18:28:41 +0000 (19:28 +0100)
commit907506695549c689710cd267583f6fd439711dcf
treefaaf1ba736fdd578d8e76d404ac13b026e223f08
parentf63d1b0efa64fe716c2855a0410ac47ad67f7dec
logind: log wall messages to the journal

Currently kde installs a fake utmp session to listen for this. This provides an
alternative mechanism as discussed in #23574.

Example with 'shutdown 6 -r' and shutdown -c':
    PRIORITY=6
    SYSLOG_FACILITY=4
    SYSLOG_IDENTIFIER=systemd-logind
    ...
    CODE_FILE=src/login/logind-utmp.c
    CODE_LINE=90
    CODE_FUNC=warn_wall
    MESSAGE_ID=9e7066279dc8403da79ce4b1a69064b2
    OPERATOR=root
    MESSAGE=The system will reboot at Thu 2022-06-30 12:16:43 CEST!
    ACTION=reboot

    PRIORITY=5
    SYSLOG_FACILITY=4
    SYSLOG_IDENTIFIER=systemd-logind
    ...
    OPERATOR=root
    CODE_FILE=src/login/logind-dbus.c
    CODE_LINE=2407
    CODE_FUNC=method_cancel_scheduled_shutdown
    MESSAGE=System shutdown has been cancelled
    MESSAGE_ID=249f6fb9e6e2428c96f3f0875681ffa3
    ACTION=reboot
src/login/logind-dbus.c
src/login/logind-utmp.c
src/systemd/sd-messages.h