]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/systemctl/systemctl.c
systemctl: add log-level and log-target commands
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 15 Nov 2019 08:39:50 +0000 (09:39 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 18 Nov 2019 15:26:17 +0000 (16:26 +0100)
commit38fcb7f766c84736425e86854b8a4468c126dafa
tree476a8b2cb7d5d1f68cb938417640d52ede63d704
parentf0f3a0b52a38a0b1a5e80f09119ec1f84a21e9cd
systemctl: add log-level and log-target commands

This copies the commands log-level and log-target (to query and set the current
settings) from systemd-analyze to systemctl, essentially reverting
a65615ca5d78be0dcd7d9c9b4a663fa75f758606. Controllling the log level settings
of the manager is basic functionality, that should be available even if
systemd-analyze (which is more of an analysis tool) is not installed. This is
like dmesg and journalctl, which should be available even if a debugger and
more advanced tools to analyze the kernel are not available. (Note that dmesg
is used to control the log level too, not just to browse the kernel logs.)

I chose to copy&paste the methods from analyze.c to the new location. There
isn't enough code to share, because acquire_bus() in both places has a
different signature despite the same name, so the only part that is common
is the invocation of sd_bus_set_property().
man/systemctl.xml
src/systemctl/systemctl.c