Logger (command)

From wikieduonline
Revision as of 06:14, 12 December 2019 by Welcome (talk | contribs) (Created page with "Linux<ref>http://man7.org/linux/man-pages/man1/logger.1.html</ref> (<code>util-linux</code> package) and most BSDs including MacOS provide logger command line utility to send...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Linux[1] (util-linux package) and most BSDs including MacOS provide logger command line utility to send messages to syslog, locally or to a remote syslog server. Many languages provide support for writing messages to syslog, such as go: https://godoc.org/github.com/spkg/slog.


Basic Usage

  • logger -s "Message"
-s, --stderr Output the message to standard error as well as to the system log.

Activities

  1. Log messages to a different file using rsyslog and logger command[2]


See also

Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy.

Original Source: https://en.wikiversity.org/wiki/Linux_Administration/System_Services/System_Logging/logger

Advertising: