mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-26 21:53:10 +00:00
Update cheatsheets
This commit is contained in:
34
tldr/linux/systemctl-service-log-target
Normal file
34
tldr/linux/systemctl-service-log-target
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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/systemctl.html#service-log-target%20SERVICE%20[TARGET]>.
|
||||
|
||||
- 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}} console`
|
||||
|
||||
- Set the log target to `journal` (send logs to `systemd-journald`):
|
||||
|
||||
`systemctl service-log-target {{service_name}} journal`
|
||||
|
||||
- Set the log target to `syslog` (send logs to `/dev/log`):
|
||||
|
||||
`systemctl service-log-target {{service_name}} syslog`
|
||||
|
||||
- Allow systemd to choose an appropriate log target:
|
||||
|
||||
`systemctl service-log-target {{service_name}} auto`
|
||||
|
||||
- Disable all log output:
|
||||
|
||||
`systemctl service-log-target {{service_name}} null`
|
||||
Reference in New Issue
Block a user