> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Robert Hicks
> Sent: Tuesday, 14 November 2006 8:38 a.m.
> To: [email protected]
> Subject: [cgiapp] Anyone using Log4perl?
>
> I was wondering if anyone is either working on a Log4perl plugin or is
> currently using it in CA with a simple pre-run wrapper.
>
You could try something like in your base class:
sub logger {
my $self = shift;
unless ($self->{__MYAPP_LOGGER}) {
Log::Log4perl::init_and_watch($self->conf->param('cms_logger_conf'),
30);
$self->{__MYAPP_LOGGER} = get_logger("cms");
}
return $self->{__MYAPP_LOGGER};
}
And then test with something like this in your code:
$self->logger->debug('Test message');
Dan
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]