LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

systemd-cat

Connect command output to the systemd journal

TLDR

Write the output of a command to the journal
$ systemd-cat [command]
copy
Write the output of a pipeline to the journal
$ [command] | systemd-cat
copy
Use a specified identifier for log entries
$ [command] | systemd-cat -t [id]
copy
Use a specified priority level for logged messages
$ systemd-cat -p [emerg|alert|crit|err|warning|notice|info|debug] [command]
copy
Use a specified priority for stderr messages
$ systemd-cat --stderr-priority [priority] [command]
copy

SYNOPSIS

systemd-cat [options] [command] [arguments]

DESCRIPTION

systemd-cat connects a command or pipeline's output streams to the systemd journal. It is useful for logging output from cron jobs, scripts, or any command that doesn't natively support journal logging.When run with a command, both stdout and stderr are captured. When used as a pipe target, only stdin (the pipe) is captured while stderr remains connected to the terminal.

PARAMETERS

-t, --identifier _name_

Syslog identifier for log entries
-p, --priority _level_
Default priority level for stdout messages
--stderr-priority _level_
Priority level for stderr messages
--level-prefix BOOL
Interpret sd-daemon(3) style priority prefixes in log output (default: true)
-h, --help
Display help information

INSTALL

sudo apt install systemd
copy
sudo dnf install systemd
copy
sudo pacman -S systemd
copy
sudo zypper install systemd
copy
brew install systemd
copy
nix profile install nixpkgs#systemd
copy

CAVEATS

When used in a pipeline, only the piped output is captured. The identifier defaults to the name of the invoked program, or "cat" in pipe mode. Priority levels follow syslog conventions (0=emerg through 7=debug).

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid