Use Logger to Write Messages to Log Files
Feb 15, 2011, 17:34 (0 Talkback[s])
(Other stories by Joe 'Zonker' Brockmeier)
"Want a quick and easy way to write to system logs? Check out
logger, a shell utility that works with syslog.
"The logger utility is part of the bsdutils package on
Debian-based systems and the util-linux-ng package on Fedora (and
presumably Red Hat Enterprise Linux, although I don't have a RHEL
system handy to check). It should be installed by default.
"The most common use for logger is as a lightweight way to pass
messages from a script to logfiles. Say you've got a backup script
or another job that runs while you're home snoozing. Rather than
having the script send an email and clog up your inbox, you can add
logger to your script, and check periodically, at your leisure, to
make sure things went as planned -- or use logger to just log error
messages when the job doesn't run as planned or encounters an