[Catalyst] Log4Perl with Appender DBIx

cylontoaster cylontoaster at gmx.de
Mon Oct 24 10:57:32 GMT 2011


I wanted to use Log4Perl for all my logging-purposes and stumbled over 
some pitfalls.
Can anybody give me a hint for configuring Log4Perl using the DBIx-appender?

So, I installed Log::Log4perl::Appender::DBIx::Class and extended my 
Log4Perl-configuration-file with this:

# DBIx
log4perl.appender.DB                                    = 
log4perl.appender.DB.schema                      = DW::Schema
log4perl.appender.DB.class                           = 
log4perl.appender.DB.category_column       = logger_category
log4perl.appender.DB.level_column              = logger_level
log4perl.appender.DB.message_column       = logger_message
log4perl.appender.DB.layout                         = 

Because, my 'connect_info's are in a configuration-file, I also have 
problems connecting the DB.
That's why I also inserted ...

log4perl.appender.DB.connect_info= dbi:mysql:dbname, "user", "pw"

... which throws an exception like:

Couldn't load class (DW) because: DBI Connection failed: DBI 
connect('dbname, "user", "pw"','',...) failed: Access denied for user 
'root'@'localhost' (using password: NO) at 
/root/perl5/lib/perl5/DBIx/Class/Storage/DBI.pm line 1262

Anybody already used this module?

I'm grateful for every response.
Thanx in advance,

More information about the Catalyst mailing list