Monday, August 21, 2006

ConfigLoader and Log::Log4perl

it seems that ConfigLoader and Log::Log4perl in Catalyst are not such perfect.

ConfigLoader cann't load more than 2 yaml files like "a.yml", "b.yml", "c.yml".(Am I missing something?) but Config::YAML does.
use Catalyst qw/ .. Config::YAML ../;
__PACKAGE__->config('config_file' => ['a.yml', 'b.yml', 'c.yml']);
__PACKAGE__->setup;


and when I setup the Catalyst::Log::Log4perl up, but it sucks. the log conf is something like:
log4perl.logger.Foorum=DEBUG, Log

log4perl.appender.Log=Log::Dispatch::File
log4perl.appender.Log.filename=../log/foorum.log
log4perl.appender.Log.mode=append
log4perl.appender.Log.layout=PatternLayout
log4perl.appender.Log.layout.ConversionPattern=%d %p> %F{1}:%L %M - %m%n
and script like:
# Log4perl
use Catalyst::Log::Log4perl;
__PACKAGE__->log(Catalyst::Log::Log4perl->new('../logger.conf'));
__PACKAGE__->setup;
but the foorum.log shows:
2006/08/21 19:10:55 DEBUG> Catalyst.pm:1457 Catalyst::handle_request - debug
2006/08/21 19:10:55 INFO> Catalyst.pm:1457 Catalyst::handle_request - info
the "Catalyst.pm 1457 Catalyst::handle_request" is useless. mm, Am I missing something too?

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home