Hi,
Has anybody got some examples about how to use this.
It looks like you just have to put the following lines in the main package
before __PACKAGE__->setup():
use Log::Log4perl::Catalyst;
__PACKAGE__->log(Log::Log4perl::Catalyst->new('/path/to/log4perl.conf'));
That works up to a point in that the log messages are formatted as I want.
However they always go to the STDERR and not to the file given in
log4perl.conf. I've used the conf file in a test, so I know it works outside
Catalyst. I'm using the Catalyst development server, does that over-ride the
logger?
The other thing is that I don't really want to hardcode the filename. It should
be in the application's conf file. However, if I just stick it in there as so:
<Log4perl>
conf_file
/var/www/mymercedesservice.co.uk/fcgi/catalyst/mbfl2/lib/mbfl2/log4perl.conf
</Log4perl>
I can't access it via __PACKAGE__->config->{Log4perl}->{conf_file};
until after setup() has run.
Does that matter?
Thanks
Duncan
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/