Logger is indeed a useful command line tool for shell scripts that want
to log messages to syslog.
If you're writing Perl scripts you have a little more in the way of
You can use the CPAN module Sys::Syslog for basic syslog access. Or you
can use Log::Dispatch which can use Syslog, amongst other things such as
Email, files etc.
You can also use Log::log4perl which is a Perl version of Log4J. Log4J
is a very flexible application logging framework.
If you're a PHP coder you can use log4php. In fact on
there are links to ports for PHP, C/C++, .Net/Mono,
Perl, PLSQL, and Java. Most Log4J ports support some sort of Syslog
Deciding on a good Logging framework early on in your applications
development, no matter what language you use, can be a very good thing.
Logging can aid tremendously in debugging and understanding what your
daemons/applications are doing.
A good thing about the Log4* framework is that you can leave your
logging statements in your code and control the verbosity very finely
with config files (XML or "property" style files).
On Tue, 2005-04-19 at 17:32 +1200, James Clark wrote:
This isn't new to me, but maybe someone might
think "hey that's just
what I wanted", since it's a slow day on yon list.
If your running an application and want to capture the output to a system
log file, you can use logger.
Instead of explain it in too much depth, try the below while tail -f'ing
echo test | logger -p daemon.info -t \[test\]
You'll now have an idea of what it does and why you might like to use it,
of course you can do more so you can always rtfm @ `man logger`.
wlug mailing list | wlug(a)list.waikato.ac.nz
Oliver Jones » Roving Code Warrior
oliver(a)deeperdesign.com » +64 (21) 41 2238 » www.deeperdesign.com