snippetbashTip
systemctl service-log-target — Get or set the log target for a service. Only works for D-Bus integrated services. More information:
Viewed 0 times
thecommandsystemctl service-log-targetclilogsetgettarget
linux
Problem
How to use the
systemctl service-log-target command: Get or set the log target for a service. Only works for D-Bus integrated services. More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#service-log-target%20SERVICE%20%5BTARGET%5D>.Solution
systemctl service-log-target — Get or set the log target for a service. Only works for D-Bus integrated services. More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#service-log-target%20SERVICE%20%5BTARGET%5D>.Show the current log target for a service:
systemctl service-log-target {{service_name}}Set the log target to
console (send logs to stderr):systemctl service-log-target {{service_name}} consoleSet the log target to
journal (send logs to systemd-journald):systemctl service-log-target {{service_name}} journalSet the log target to
syslog (send logs to /dev/log):systemctl service-log-target {{service_name}} syslogAllow systemd to choose an appropriate log target:
systemctl service-log-target {{service_name}} autoDisable all log output:
systemctl service-log-target {{service_name}} nullCode Snippets
Show the current log target for a service
systemctl service-log-target {{service_name}}Set the log target to `console` (send logs to `stderr`)
systemctl service-log-target {{service_name}} consoleSet the log target to `journal` (send logs to `systemd-journald`)
systemctl service-log-target {{service_name}} journalSet the log target to `syslog` (send logs to `/dev/log`)
systemctl service-log-target {{service_name}} syslogAllow systemd to choose an appropriate log target
systemctl service-log-target {{service_name}} autoContext
tldr-pages: linux/systemctl service-log-target
Revisions (0)
No revisions yet.