This is an old revision of the document!
Logger
General Information
Logger is a shell command interface to syslog.
Log Everwhere
To log to three visible places in one command:
logger --stderr --priority local0.notice -t "My Prefix Here" "My Message Here" 2>&1 | tee /dev/console
- –stderr → Log to ssh sessions
- local0.notice → Log to /var/log/messages
- tee /dev/console → Log to the console device (visible if connected via KVM to a physical system or virtual console on a virtual machine)