<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">                           Log::Agent 0.1
                 Copyright (c) 1999, Raphael Manfredi

------------------------------------------------------------------------
    This program is free software; you can redistribute it and/or modify
    it under the terms of the Artistic License, a copy of which can be
    found with perl.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    Artistic License for more details.
------------------------------------------------------------------------

       *** This is alpha software -- use at your own risks ***

Name           DSLI  Description                                  Info
-----------    ----  -------------------------------------------- -----
Log::Agent     adpr  A general logging framework                  RAM
::Driver       ----  Ancestor class for all Log::Agent drivers    RAM
::Caller       ----  Fetch and format caller information          RAM
::Message      ----  A log message with append/prepend routines   RAM
Log::Agent::Driver
::Default      ----  The default logging driver                   RAM
::File         ----  Log messages redirected to files             RAM
::Silent       ----  Silence all the log messages                 RAM
::Syslog       ----  Redirects all messages to Sys::Syslog        RAM

SYNOPSIS

	#
	# In reusable modules, log via logxxx() routines
	#

	use Log::Agent;

	logsay "creating file";
	open(FILE, "&gt;&gt;file") || logdie "can't append to file: $!";
	....
	close FILE;
	logwarn "MANIFEST not found" unless -e 'MANIFEST';

	#
	# In the application, choose a driver for logxxx() messages
	#
	# Default behaviour: no need to do anything. logxxx() messages will
	# be mapped to print, warn or die, as appropriate.
	#
	# Or customize a driver, as we do here.
	#

	use Log::Agent;
	require Log::Agent::Driver::File;

	(my $me = $0) =~ s|.*/(.*)|$1|;

	my $driver = Log::Agent::Driver::File-&gt;make(
		-prefix     =&gt; $me,
		-showpid    =&gt; 1,
		-channels   =&gt; {
			'error'    =&gt; '/tmp/output.err',
			'output'   =&gt; 'log.out',
			'debug'    =&gt; '../appli.debug',
		},
	);
	logconfig(-driver =&gt; $driver, -level =&gt; 'notice');

	#
	# Alternative: redirect to syslog
	#

	use Log::Agent;
	require Log::Agent::Driver::Syslog;

	(my $me = $0) =~ s|.*/(.*)|$1|;

	my $driver = Log::Agent::Driver::Syslog-&gt;make(
		-prefix     =&gt; $me,
		-showpid    =&gt; 1,
		-facility   =&gt; "user",
		-logopt     =&gt; "ndelay",
	);
	logconfig(-driver =&gt; $driver, -level =&gt; 'debug');

DESCRIPTION

Log::Agent is a general logging framework aimed at reusable modules.

Instead of having modules insist on using their onw logging reporting
(by hardwiring calls to warn() or syslog()) which can conflict with
the final application's choice, one may use logwarn() for instance to
emit a warning.

It is then up to the application to decide, once and for all, which
logging scheme should be used, by selecting a proper driver. If it
does not select one, the Default driver will be used, which is a simple
mapping of the logwarn() routine to warn(), for instance.

Or the application may choose to use the Silent driver to make all the
logwarn() calls be ignored, the Syslog driver to redirect logwarn()
to Sys::Syslog, or the File driver to redirect logwarn() to the 'error'
channel defined (by default STDERR), whith proper time stamping.

The available calls are:

	logdie
	logerr
	logwarn
	logsay
	logtrc 'priority', "message"
	logdbg 'priority', "message"

Please read the Log::Agent(3) manpage and the related pages for more
information.

BUGS

Expect failure of tests 6 and 10 for t/default on Linux platforms
with perl 5.005.

This is a perl or glibc bug, it's hard to tell which. Since it only
happens on Linux with glibc, I'm tempted to call it a glibc bug, but
that does not prove anything.

-- Raphael Manfredi &lt;Raphael_Manfredi@pobox.com&gt;

</pre></body></html>