Uploaded DBIx::Log4perl to CPAN
am 22.05.2006 21:35:00 von Martin.EvansI've uploaded DBIx::Log4perl 0.04 to CPAN.
DBIx::Log4perl uses Log4perl to log to a file, send email, even
log to DBI itself (see Log::Log4perl::Appenders) details
about what SQL you've prepared, parameters passed to execute or
execute_array, result-sets, transactions etc etc without the
overhead of turning DBI tracing on.
The main advantages of DBIx::Log::Log4perl are:
o you can incorporate various classes of errors in your code and change
what gets logged without changing your code.
o Log::Log4perl contains a highly configurable configuration with
lots of different appenders (targets for the messages) and a class-like
organisation of logging.
o you can direct debug, info, error, warnings, fatal etc to different
Log4perl appenders which means for instance debug info can go to a file
(when debug is enabled) and fatals to an email etc.
o it is not as verbose as DBI tracing
o it concentrates on the external side of DBI rather than the
internals of DBI i.e. you get to see the SQL you've prepared and
the parameters you've passed in execute etc but not all of the other
internal DBI stuff.
o it includes a DBI error handler which attempts to output
everything it can possibly find out about an error raised by
DBI (some features of this need the latest DBI and two features
of this require a yet-to-be-released DBI).
FYI: I'm rather impressed with Log::Log4perl and I'd recommend it
to anyone wanting to get different classes of debugging and error
logging out of their module.
I'm not making any great claims for it (I hope) but it has helped me
locate and identify a number of bugs and optimisations in
the perl DBI code I'm working on and I thought it may help
others.
I don't think DBIx::Log4perl is indexed on CPAN yet but it is under
the MJEVANS author tree.
Martin