summaryrefslogtreecommitdiffstats
path: root/misc-utils/logger.1
Commit message (Collapse)AuthorAgeFilesLines
* logger: (man) add info about rewrite and authorsKarel Zak2019-01-291-0/+16
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: (man) make more obvious that --server/socket is requiredKarel Zak2019-01-291-0/+4
| | | | | | The options --tcp/udp specify only how, but no where. Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: concatenate multiple lines of MESSAGE into a single field.Karel Zak2019-01-231-0/+4
| | | | | | | | | | | | this is deemed a useful special case since journalctl will only show either the first or last element of the message array if the field appears multiple times. Based on patch from: Kjetil Torgrim Homme <kjetil.homme@redpill-linpro.com> https://github.com/karelzak/util-linux/pull/743 Addresses: https://github.com/karelzak/util-linux/issues/742 Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: add -S to the man pageKarel Zak2018-08-101-1/+1
| | | | | Reported-by: Radka Skvarilova <rskvaril@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* man pages: fix formatting of long lines in tablesBjarni Ingi Gislason2018-08-061-2/+5
| | | | | | | | | Define the allowed length of the last (second) column to use the whole line for text. Use text blocks for long lines. Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
* man pages: Remove "left" (or change to "l") in the column formats of tablesBjarni Ingi Gislason2018-08-061-2/+2
| | | | | | | | | A developmental version of "groff" issued a warning, for example with "test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z": troff: <logger.1>:299: warning: can't find font 't' Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
* man: Use the correct macro for a font change of one argumentBjarni Ingi Gislason2018-05-231-1/+1
| | | | | | | | Use the correct macro (I, B) for the font change of one argument, not those that are used for alternating two fonts, like "BR", "IR", "RB", or "RI". Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
* docs: replace FTP by HTTPS in kernel.org URLsSébastien Helleu2016-12-191-1/+1
| | | | | | | The links to ftp://ftp.kernel.org/ are replaced by https://www.kernel.org/. Signed-off-by: Karel Zak <kzak@redhat.com>
* Place SEE ALSO entries in orderMichael Kerrisk (man-pages)2016-11-291-1/+1
| | | | | | | | | | | | This patch does only the following: * Order SEE ALSO entries first by section name, then alphabetically within section * Adds one or two missing commas in SEE ALSO lists * Removes one or two periods that were (inconsistently) used at the end of SEE ALSO lists. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
* docs: Fix various typosSebastian Rasmussen2016-05-311-3/+3
| | | | Signed-off-by: Sebastian Rasmussen <sebras@gmail.com>
* man pages: fix spacing between man page name & section numberMike Frysinger2016-05-201-1/+1
| | | | | | Most have standardized correctly, but fix a few latent ones. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* logger: add man page note about the default --tagKarel Zak2016-05-161-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: keep man page consistent and use \- everywhereKarel Zak2016-03-101-8/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: sort the options in the manpage alphabeticallyBenno Schulenberg2015-11-091-47/+46Star
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* logger: improve grammar and formatting of the manpageBenno Schulenberg2015-11-091-50/+53
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* logger: use --id as local socket credentialsKarel Zak2015-10-291-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | If you have really paranoid syslog (or systemd who listens on /dev/log) then it replaces in the message PID with a real PID from socket header credentials: # echo $PPID 1550 # logger -p info --stderr --id=$PPID "This is message baby!" <14>Oct 29 11:22:13 kzak[1550]: This is message baby! # journald -n 1 Oct 29 11:22:13 ws kzak[22100]: This is message baby! ^^^^^ This patch forces kernel to accept another *valid* PID if logger(1) executed with root permissions; improved version: # logger -p info --stderr --id=$PPID "This is message baby!" <14>Oct 29 11:26:00 kzak[1550]: This is message baby! # journald -n 1 Oct 29 11:26:00 ws kzak[1550]: This is message baby! Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: add --sd-id and -sd-paramKarel Zak2015-10-011-3/+43
| | | | | | | | | | | | | | | | | | This patch add support for RFC 5424 structured data elements. For example: logger --rfc5424 --sd-id zoo@123 \ --sd-param tiger=\"hungry\" \ --sd-param zebra=\"running\" \ --sd-id manager@123 \ --sd-param onMeeting=\"yes\" \ "this is message" produces: <13>1 2015-10-01T14:07:59.168662+02:00 ws kzak - - [timeQuality tzKnown="1" isSynced="1" syncAccuracy="218616"][zoo@123 tiger="hungry" zebra="running"][manager@123 onMeeting="yes"] this is message Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: improve logger --journald man page exampleMichal Schmidt2015-09-071-1/+7
| | | | | | | | | | | | | | | | 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>
* logger: Add support to logger for RFC6587 octet countingAlex Bligh2015-07-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds support to logger for RFC6587 octet counting. RFC6587 provides support for two sorts of framing: 1. Octet counting (at RFC6587 s3.4.1) In essence each frame is preceded by a decimal length and a space. 2. Non-transparent framing (at RFC6587 s3.4.2), also called 'octet stuffing' In essence each frame is terminated by a `\n` Prior to this patch, logger used option 2 (non-transparent framing) on TCP, and used no framing on UDP. After this patch, the default behaviour is unchanged, but if the '--octet-count' option is supplied, option 1 is used for both TCP and UDP. Arguably octet count framing makes little sense on UDP, but some servers provide it and this allows testing of those servers. Signed-off-by: Alex Bligh <alex@alex.org.uk>
* logger: add note about kern->user conversionKarel Zak2015-06-241-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: add --no-act for testingKarel Zak2015-03-161-0/+5
| | | | | | | | | | * force --journal mode to also output to stderr when the option --stderr specified on command line * add --no-act to avoid all write() operations to make it possible to write tests without "spam" system logs Signed-off-by: Karel Zak <kzak@redhat.com>
* logger man page: fix typoRainer Gerhards2015-03-101-1/+1
|
* logger: add --msgid option, permits to set RFC5424 MSGID fieldRainer Gerhards2015-03-101-0/+6
|
* logger: add --skip-empty-lines to prevent logging empty linesRainer Gerhards2015-03-101-0/+8
| | | | | | | | | | | Empty log messages are generally considered useless. This option enables to turn them off when processing files (including stdin). [kzak@redhat.com: - rename --skip-empty-lines to --skip-empty, - add the option to getopt_long(), - add the option to bash-completion] Signed-off-by: Karel Zak <kzak@redhat.com>
* logger man page: update --size docRainer Gerhards2015-03-101-4/+7
| | | | | | now we have strict sizes Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: permit to send messages larger than 1024 charactersRainer Gerhards2015-03-101-0/+15
| | | | | | | | | | | | | | | | | | This is an important capability that has been specified in RFC5424. However, messages larger than 1024 chars are being accepted for years now by at least rsyslog and syslog-ng. This patch adds the option --size to permit setting a new max size, with 1024 being the default. Note that the size limit is only approximative, as we do not take the header size in account (RFC talks about total message length). [[kzak@redhat.com: - add 'S' to getopt_long(), - rename --message-size to --size - add the option to bash-completion] Signed-off-by: Karel Zak <kzak@redhat.com>
* logger man page: bump man page date to currentRainer Gerhards2015-03-061-1/+1
|
* logger man page: fix some "syslog(3) routine" remnantsRainer Gerhards2015-03-061-2/+2
|
* logger: remove "interface to syslog(3)" from man pageKarel Zak2015-03-061-5/+1Star
| | | | | | | since v2.26 logger does not use syslog(3) anymore Reported-by: Rainer Gerhards <rgerhards@adiscon.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: fix -i argument parsing regressionSami Kerola2015-03-051-1/+4
| | | | | | | | | | | | | | | | | With earlier logger it's possible to combine the option -i with other options, such as -s. But currently: $:~> logger -is logger: failed to parse id: 's' The changed behaviour breaks existing scripts like dhcpcd-run-hooks from dhcpcd. Broken-since: aab5b44405b9a6ada92e419e5a84cc0d1d4afee9 Reference: http://comments.gmane.org/gmane.linux.utilities.util-linux-ng/9683 Reported-by: Juergen Daubert <jue@jue.li> Reviewed-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* logger: add --socket-errors compatibility optionSami Kerola2015-02-161-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hello, Depending viewpoint this change is either regression fix, or re-regression in context of none-systemd init. I ack the change is sent very late to be part of v2.26, but then again the excess noise was found only because of -rc1 was tested in sysvinit environment. IMHO it would contradict purpose of having rc's if faults will not lead to fixes. I also want to point out the sysvinit scripts are broken, not the logger(1), but getting them corrected is practically impossible. Assuming sysvinit script are further developed by various teams and distributions who maintain them they should use --socket-error=on in future, and write scripts that pass without noise. Meanwhile trying to be clever when to silence errors seems like a reasonable thing to do. --->8---- From: Sami Kerola <kerolasa@iki.fi> Date: Sat, 14 Feb 2015 19:05:55 +0000 Subject: [PATCH] logger: add --socket-errors compatibility option Now when logger(1) has stopped using openlog() for Unix sockets, in commit mentioned in reference, the lack of /dev/log detected will report error accordingly. According to Gabriele Balducci this makes sysvinit style boot scripts to print a lot of errors. So make the logger to detect whether it should be in compatibility mode, and not report errors if logging device is missing. That imitates behavior of glibc openlog(). To allow full control to users the /dev/log error messages can be forced to on or off. The automatic error messaging is explained in manual page. Reference: 1d57503378bdcd838365d625f6d2d0a09da9c29d Reported-by: Gabriele Balducci <balducci@units.it> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* Merge branch 'opts' of https://github.com/jwpi/util-linuxKarel Zak2015-01-261-1/+1
|\
| * docs: restore minus symbols in long optsJ William Piggott2015-01-211-1/+1
| | | | | | | | Signed-off-by: J William Piggott <elseifthen@gmx.com>
* | docs: fix two spellings in man page of loggerBenno Schulenberg2015-01-261-2/+2
|/ | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: remove obsolete and unneeded comments from man-page filesBenno Schulenberg2015-01-121-3/+0Star
| | | | | | | Transform some of them into copyright lines. Also fix three header lines and snip some trailing whitespace. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: adjust the grammar, text, sorting and formatting of logger man pageBenno Schulenberg2014-12-191-142/+116Star
| | | | | | | | | | The message argument is not an option and should not be listed among those. Describe the optional argument of --rfc5424 better. Use the = and no space for optional option arguments. Don't italicize words unnecessarily. Use bold for literal things. And sort the options alphabetically (apart from -V and -h). Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: don't use bold or italics for "[option]" in synopsis of man pagesBenno Schulenberg2014-12-191-1/+2
| | | | | | | As per the convention shown in Documentation/howto-man-page.txt. Also make a few other tiny adjustments along the way. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: Spelling fixesVille Skyttä2014-11-181-1/+1
| | | | | Signed-off-by: Ville Skyttä <ville.skytta@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: use generic --id=<id>Karel Zak2014-08-201-5/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: mentintion default udp and tcp ports logger is usingSami Kerola2014-08-151-0/+7
| | | | | | | | The fact that 'syslog tcp/514' does not exist in RFS's, which has lead to 'syslog-conn 601/tcp' be used in place could be a suprice and should be told in manual. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* logger: add process --id=parent optional argumentSami Kerola2014-07-281-3/+7
| | | | | | | | When scripts send several messages they will be easier to group together when parent process id is printed rather than id of the each logger process. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: add logger protocol notes to manual pageSami Kerola2014-07-281-1/+27
| | | | | | | | Inform about rfc5424 support, how to control what it includes to submission, and that it is the new default when sending syslog messages to remote server without specifying protocol. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: make logger.1 facilities and levels easier to readSami Kerola2014-07-281-20/+41
| | | | | | Most people read vertical list a lot quicker than horizontal. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* Add missing paragraph mark before -fA. Bram Neijt2014-07-161-0/+1
| | | the sections on -P and -f where glued together.
* logger: allow user to send structured journald messagesSami Kerola2014-03-041-1/+28
| | | | | | | | | | | | | This feature is hopefully mostly used to give MESSAGE_ID labels for messages coming from scripts, making search of messages easy. The logger(1) manual page update should give enough information how to use --journald option. [kzak@redhat.com: - add missing #ifdefs - use xalloc.h] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: standardize the phrases for --help and --version in all man pagesBenno Schulenberg2013-10-151-1/+1
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: sort the options in the logger man page alphabeticallyBenno Schulenberg2013-10-141-31/+31
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: improve a bit the wording on the logger man pageBenno Schulenberg2013-10-141-13/+13
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* logger: add support for --prio-prefix when logging stdinDennis H Jensen2013-05-291-0/+13
| | | | | | | | | | | | | | | | 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>
* logger: allow to log using tcp transport protocolSami Kerola2013-04-081-12/+25
| | | | | | | | | | | | | | | | | This commit fixes error in usage() text, which claimed TCP is default transport protocol. That was not true, and neither it should be. The syslog messages has traditionally sent using UDP. For the logger remains using UDP as first transport, but if it fails a TCP connection is attempted. If an user wishes remote logging can be forced to use either UDP or TCP. The service port for UDP is familiar 'syslog', for TCP the port 'syslog-conn' seems like reasonable default. [kzak@redhat.com: - rename myopenlog to unix_socket(), - always reset st to -1] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>