summaryrefslogtreecommitdiffstats
path: root/misc-utils/logger.1
diff options
context:
space:
mode:
authorMichal Schmidt2015-09-03 13:41:19 +0200
committerKarel Zak2015-09-07 08:54:15 +0200
commitb632f55c29cf516af266c92304844adb98ef5fbd (patch)
treee6b0d6e229014a1f3f2fc943b663681f84988c35 /misc-utils/logger.1
parenthwclock: fix format warning in alpha code (diff)
downloadkernel-qcow2-util-linux-b632f55c29cf516af266c92304844adb98ef5fbd.tar.gz
kernel-qcow2-util-linux-b632f55c29cf516af266c92304844adb98ef5fbd.tar.xz
kernel-qcow2-util-linux-b632f55c29cf516af266c92304844adb98ef5fbd.zip
logger: improve logger --journald man page example
The example use of logger --journald in the man page has a couple of flaws: - It's missing a "MESSAGE=" field. This is supposed to be the primary human readable text. Without it the log entry is invisible in a plain "journalctl" output. - The MESSAGE_ID is supposed to be a 128-bit hexadecimal string that globally uniquely identifies the message type. One can generate such an id with "journalctl --new-id". This patches fixes the above and also changes the example to use a here-document instead of printf. In my opinion it makes the expected multi-line data format more obvious. Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Diffstat (limited to 'misc-utils/logger.1')
-rw-r--r--misc-utils/logger.18
1 files changed, 7 insertions, 1 deletions
diff --git a/misc-utils/logger.1 b/misc-utils/logger.1
index 36c923d52..5deb3f0a1 100644
--- a/misc-utils/logger.1
+++ b/misc-utils/logger.1
@@ -81,7 +81,13 @@ for details. The use of a MESSAGE_ID field is generally a good idea, as it
makes finding entries easy. Examples:
.IP
.nf
-\fB printf \(dq%s\\n%s\\n%s\\n\(dq MESSAGE_ID=42 DOGS=bark \(dqCARAVAN=goes on\(dq | logger --journald
+\fB logger --journald <<end
+\fB MESSAGE_ID=67feb6ffbaf24c5cbec13c008dd72309
+\fB MESSAGE=The dogs bark, but the caravan goes on.
+\fB DOGS=bark
+\fB CARAVAN=goes on
+\fB end
+.IP
\fB logger --journald=entry.txt
.fi
.IP