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
On 2013-05-15 17:54, Duncan Garland wrote:
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;
Hi Duncan,
I overcame the hardcoding of filenames by storing them in the app config, like
so:
In your MyApp.pm:
__PACKAGE__-setup;
__PACKAGE__-log( Log::Log4perl::Catalyst-new(
__PACKAGE__-path_to(__PACKAGE__-config-{path_to_log4perl_conf})-stringify )
);
Then in the main app config: