On Mon, 09 Mar 2009 12:09 -0700, "Mike Schilli"
wrote:
> A, gotcha, I forgot that you have a long-running process and want to
> switch log files for every request. To do that, you can write your own
> appender (it's very easy, check
> http://search.cpan.org/dist/Log-Log4perl/lib/Log/Log4perl/FAQ.p
On Fri, 6 Mar 2009, Ronald Fischer wrote:
> I understand how to do it in a config file, but I don't see how to do
> it in my code. Probably it is not possible at all with easy_init
> (which I would like to continue to use)
easy_init() and init() are using the same underlying internal Log4perl
API
Resent of my posting from 24 Feb which seems to have been lost.
- Original message -
From: "Ronald Fischer"
To: "Mike Schilli"
Cc: "Mike Schilli" , "log4perl MailingList"
Date: Tue, 24 Feb 2009 09:52:06 +0100
Subject: Re: [log4perl-devel] Append
On Mon, 23 Feb 2009 08:34 -0800, "Mike Schilli"
wrote:
> > The other problem is that I would strongly prefer a solution without
> > l4p configuration file. The reason is that one requirement for our
> > application was "one config file only", so we have an application
> > specific configuration fi
On Fri, 20 Feb 2009 10:41 -0800, "Mike Schilli"
wrote:
> On Fri, 20 Feb 2009, Ronald Fischer wrote:
> >> log4perl.logger = DEBUG, FooApp, BarApp, AnotherAppender
> >
> > This is valid Perl code? So I have to the left of the assignment a
> > catenation, and to the right the comma operator?
On Mon, 23 Feb 2009, Ronald Fischer wrote:
> I see, and I guess get_request_name must be in package main so that
> the logging package can find it?
Either that or you call the fully qualified name,
Foo::Bar::get_request_name.
> There are times where there is no request being processed, but still
On Thu, 19 Feb 2009 21:13 -0800, "Mike Schilli"
wrote:
> Actually, just for the record, you can set an appender's layout:
>
> $appender->layout($layout); # perldoc Log::Log4perl::Appender
I tried the following code:
$nl =
Log::Log4perl::Appender::File->new(
filename
> What you think is a 'logger' is really an appender in Log4perl lingo. An
> appender has no concept of a level like 'debug', only loggers do.
I see, and that's why it also can't understand about layouts.
> The reason why you get the error message 'on an undefined value' is an
> internal autoload
On Fri, 20 Feb 2009, Ronald Fischer wrote:
> I tried the following code:
>$nl =
> Log::Log4perl::Appender::File->new(
>filename => $logname,
>mode => 'clobber',
>utf8 => 1,
>create_at_logtime => 1
> );
>$nl->layout(
On Thu, 19 Feb 2009, Ronald Fischer wrote:
>> What you think is a 'logger' is really an appender in Log4perl lingo. An
>> appender has no concept of a level like 'debug', only loggers do.
>
> I see, and that's why it also can't understand about layouts.
Actually, just for the record, you can set
On Wed, 18 Feb 2009, Ronald of Steiermark wrote:
> Reason for this probably slightly unusual way of using Log::Log4perl
> is the following:
Hi Ronald,
indeed, you're using Log4perl in a very unusual, not to say confusing
way.
What you think is a 'logger' is really an appender in Log4perl lingo.
This is the condensed code of my application just for demonstrating my
problem:
use strict;
use warnings;
use Log::Log4perl qw(:easy);
use Log::Log4perl::Appender::File;
Log::Log4perl->easy_init({file=>'STDOUT',layout => '%d{HH:mm} %m%n',
level=>$DEBUG});
my $logger=Log::Log4perl::Appender::File->
12 matches
Mail list logo