1SYSTEMD-CAT(1)                    systemd-cat                   SYSTEMD-CAT(1)
2
3
4

NAME

6       systemd-cat - Connect a pipeline or program's output with the journal
7

SYNOPSIS

9       systemd-cat [OPTIONS...] [COMMAND] [ARGUMENTS...]
10
11       systemd-cat [OPTIONS...]
12

DESCRIPTION

14       systemd-cat may be used to connect the standard input and output of a
15       process to the journal, or as a filter tool in a shell pipeline to pass
16       the output the previous pipeline element generates to the journal.
17
18       If no parameter is passed, systemd-cat will write everything it reads
19       from standard input (stdin) to the journal.
20
21       If parameters are passed, they are executed as command line with
22       standard output (stdout) and standard error output (stderr) connected
23       to the journal, so that all it writes is stored in the journal.
24

OPTIONS

26       The following options are understood:
27
28       -h, --help
29           Print a short help text and exit.
30
31       --version
32           Print a short version string and exit.
33
34       -t, --identifier=
35           Specify a short string that is used to identify the logging tool.
36           If not specified, no identification string is written to the
37           journal.
38
39       -p, --priority=
40           Specify the default priority level for the logged messages. Pass
41           one of "emerg", "alert", "crit", "err", "warning", "notice",
42           "info", "debug", or a value between 0 and 7 (corresponding to the
43           same named levels). These priority values are the same as defined
44           by syslog(3). Defaults to "info". Note that this simply controls
45           the default, individual lines may be logged with different levels
46           if they are prefixed accordingly. For details, see --level-prefix=
47           below.
48
49       --stderr-priority=
50           Specifies the default priority level for messages from the
51           process's standard error output (stderr). Usage of this option is
52           the same as the --priority= option, above, and both can be used at
53           once. When both are used, --priority= will specify the default
54           priority for standard output (stdout).
55
56           If --stderr-priority= is not specified, messages from stderr will
57           still be logged, with the same default priority level as stdout.
58
59           Also, note that when stdout and stderr use the same default
60           priority, the messages will be strictly ordered, because one
61           channel is used for both. When the default priority differs, two
62           channels are used, and so stdout messages will not be strictly
63           ordered with respect to stderr messages - though they will tend to
64           be approximately ordered.
65
66       --level-prefix=
67           Controls whether lines read are parsed for syslog priority level
68           prefixes. If enabled (the default), a line prefixed with a priority
69           prefix such as "<5>" is logged at priority 5 ("notice"), and
70           similar for the other priority levels. Takes a boolean argument.
71

EXIT STATUS

73       On success, 0 is returned, a non-zero failure code otherwise.
74

EXAMPLES

76       Example 1. Invoke a program
77
78       This calls /bin/ls with standard output and error connected to the
79       journal:
80
81           # systemd-cat ls
82
83       Example 2. Usage in a shell pipeline
84
85       This builds a shell pipeline also invoking /bin/ls and writes the
86       output it generates to the journal:
87
88           # ls | systemd-cat
89
90       Even though the two examples have very similar effects the first is
91       preferable since only one process is running at a time, and both stdout
92       and stderr are captured while in the second example, only stdout is
93       captured.
94

SEE ALSO

96       systemd(1), systemctl(1), logger(1)
97
98
99
100systemd 250                                                     SYSTEMD-CAT(1)
Impressum