Difference between revisions of "Logger (command)"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
Tags: Mobile web edit, Mobile edit |
||
Line 1: | Line 1: | ||
− | Linux<ref>http://man7.org/linux/man-pages/man1/logger.1.html</ref> (<code>[[ | + | Linux<ref>http://man7.org/linux/man-pages/man1/logger.1.html</ref> (<code>[[bsdutils]]</code> 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 [[programming Fundamentals/Introduction/Go|go]]: https://godoc.org/github.com/spkg/slog. |
Revision as of 05:05, 7 July 2020
Linux[1] (bsdutils
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.
echo "MY TEXT TO LOG" | logger -s
-s, --stderr
Output the message to standard error as well as to the system log.
Activities
Related terms
systemd-cat
- rfc3164
See also
log show
in MacOSjournalctl
echo
,print, printf
,tput
,logger
,write-output, echo -e, /dev/stdout, banner
- Linux logging, Cisco IOS logging
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: