]> git.ipfire.org Git - thirdparty/util-linux.git/commit
logger: add support for --prio-prefix when logging stdin
authorDennis H Jensen <dennis.h.jensen@siemens.com>
Wed, 22 May 2013 11:12:08 +0000 (13:12 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 29 May 2013 08:47:16 +0000 (10:47 +0200)
commit98920f80591b61ffdf7bfd99e2dd824406276e78
treef3b95b960f74d4aa6d596ae4ef7d987f2ca9fa15
parentd4be073d191067bf7b36dbe376289e670b3d3206
logger: add support for --prio-prefix when logging stdin

This patch adds a new option to logger that will make it look for a
priority prefix <n> at the beginning of every line. The priority is
a single decimal number formed as explained in syslog(3).

If a prefix is found logger will log the message using the found
facility and level in that prefix, if the prefix doesn't contain a
facility the default facility specified by the -p option will be used.
If no prefix is found, logger will use the priority specified by -p.

[kzak@redhat.com: - add --prio-prefix to usage() output]

Signed-off-by: Dennis H Jensen <dennis.h.jensen@siemens.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/logger.1
misc-utils/logger.c