Re: [log4perl-devel] log4perl buffering with semi persistent scripts

2011-12-07 Thread Danny Dev
December 7, 2011 9:19 AM Subject: Re: [log4perl-devel] log4perl buffering with semi persistent scripts >You didn't mention the email appender that you are using, specific >solutions would require looking into the appender's documentation and >figure out if it provides a met

Re: [log4perl-devel] log4perl buffering with semi persistent scripts

2011-12-07 Thread Danny Dev
>You didn't mention the email appender that you are using, specific >solutions would require looking into the appender's documentation and >figure out if it provides a method to flush buffered/pending messages. >If that's available, then I'd recommend encapsulating request handling >into a functio

Re: [log4perl-devel] log4perl buffering with semi persistent scripts

2011-12-06 Thread Mike Schilli
On Tue, 6 Dec 2011, Danny Dev wrote: I think perhaps what I need is to enable buffering at the start of each request, and disable it at the end of the request, is there some way to do this or does someone have another solution? You didn't mention the email appender that you are using, specific

Re: [log4perl-devel] Log4perl Wrapper

2011-10-26 Thread Mike Schilli
On Tue, 25 Oct 2011, Mike Schilli wrote: > the delay on this ... this snippet doesn't compile for me > because $cfg isn't defined Gah, I had a missing module, never mind. The wrapper registration seems to work, though, here's the output of the script below: 2011/10/26 08:44:32 l4pm 54> Whoa

Re: [log4perl-devel] Log4perl Wrapper

2011-10-25 Thread Mike Schilli
On Wed, 12 Oct 2011, J Mash wrote: I've recently encountered an odd issue while using Moose to create a wrapper class for Log::Log4perl that results in the logger's category somehow being returned as 'Eval.Closure', despite that I've registered the wrapper class as indicated in the documentation

Re: [log4perl-devel] log4perl Data::Dumper and renaming $VAR1

2010-04-09 Thread Mike Schilli
On Fri, 9 Apr 2010, Josh803316 wrote: > wn edificationwhat is the real difference between the filter > method and the sub method or are they basically the same? They're the same, just different notations. -- Mike Mike Schilli m...@perlmeister.com ---

Re: [log4perl-devel] log4perl Data::Dumper and renaming $VAR1

2010-04-09 Thread Josh803316
Thanks, that worked like a charm! Just for my own edificationwhat is the real difference between the filter method and the sub method or are they basically the same? On Fri, Apr 9, 2010 at 1:20 AM, Mike Schilli wrote: > On Fri, 9 Apr 2010, Josh803316 wrote: > > $logger->trace( {filter => \

Re: [log4perl-devel] log4perl Data::Dumper and renaming $VAR1

2010-04-08 Thread Mike Schilli
On Fri, 9 Apr 2010, Josh803316 wrote: > $logger->trace( {filter => \&Data::Dumper::Dumper, value => $name}, > undef, $TRACE, undef, undef); So my question is, how can I log the > value so it looks like $name instead of $VAR1 in the saved log? You can pass a reference to a subroutine to Log4perl's

Re: [log4perl-devel] Log4perl best practices for high traffic sites

2010-01-27 Thread Mike Schilli
On Wed, 20 Jan 2010, Trevor Little wrote: > I'm adding logging to a high-traffic mod_perl website and am worried > about the performance penalties of writing stuff to disc on every > request. It depends on your traffic numbers. I've found that a file appender works quite well up to 1000 req

Re: [log4perl-devel] Log4perl 1.25: Win XP + ActivePerl 5.10: Error running 'nmake test'

2009-10-12 Thread Mike Schilli
On Mon, 12 Oct 2009, Rindfrey, Klaus (EXT) wrote: we use Log4perl 1.21 (with Win XP, Active perl 5.10), which works fine. Now i tried 1.25: The test "059Prototyped" causes an error (unfortunately, the contents of the error box I appended is in german). That's no problem at all, I'm originally

Re: [log4perl-devel] log4perl License?

2009-09-11 Thread Mike Schilli
On Fri, 11 Sep 2009, Terry Kummell wrote: > Do we need to license log4perl in order to use it in our product? Hi Terry, Log4perl is provided under the same license as perl itself: http://dev.perl.org/licenses/ Hope that helps! -- Mike Mike Schilli m...@perlmeister.com -

Re: [log4perl-devel] Log4perl

2009-07-06 Thread Mike Schilli
On Mon, 6 Jul 2009, Oladipo, Segun wrote: > Need to install Log4perl but stuck behind a firewall. Obtained > information that it is possible to download the zipped file to a local > repository and install using ppm. The PPM is for Activestate Perl only, and it wasn't updated with the last releas

Re: [log4perl-devel] Log4perl and catching unhandle exceptions but not using 'easy' mode

2009-05-27 Thread Mike Schilli
IEHANDLE { >my $class = shift; >bless [], $class; > } > > sub PRINT { >my $self = shift; > >$Log::Log4perl::caller_depth++; >get_logger()->info(@_); >$Log::Log4perl::caller_depth--; > } > > 1; > #########

Re: [log4perl-devel] Log4perl and catching unhandle exceptions but not using 'easy' mode

2009-05-27 Thread Richard Burton
pth++; get_logger()->info(@_); $Log::Log4perl::caller_depth--; } 1; # Thanks Richard > -Original Message- > From: Mike Schilli [mailto:m...@perlmeister.com] > Sent: 20 May 2009 22:25 > To: Richard Burton > Cc: log4perl-devel@lists.sourceforge.net >

Re: [log4perl-devel] Log4perl and catching unhandle exceptions but not using 'easy' mode

2009-05-21 Thread Mike Schilli
. -- Mike Mike Schilli m...@perlmeister.com > > Does that help? > > Richard > >> -Original Message- >> From: Mike Schilli [mailto:m...@perlmeister.com] >> Sent: 20 May 2009 22:25 >> To: Richard Burton >> Cc: log4perl-devel@lists.sourcefo

Re: [log4perl-devel] Log4perl and catching unhandle exceptions but not using 'easy' mode

2009-05-21 Thread Richard Burton
that I can build it in to my code; I don't have a specific example? Does that help? Richard > -Original Message- > From: Mike Schilli [mailto:m...@perlmeister.com] > Sent: 20 May 2009 22:25 > To: Richard Burton > Cc: log4perl-devel@lists.sourceforge.net > Subje

Re: [log4perl-devel] Log4perl and catching unhandle exceptions but not using 'easy' mode

2009-05-21 Thread Mike Schilli
On Wed, 20 May 2009, Robert Jacobson wrote: > Here's what I did: 1. Make a file "trapper.pl". It's basically the > same as the example, except the Log4perl init, which uses a config > file (in this case, with a SIGHUP to re-read it): Looks ok at first glance, doesn't it produce the expected out

Re: [log4perl-devel] Log4perl and catching unhandle exceptions but not using 'easy' mode

2009-05-20 Thread Robert Jacobson
Richard Burton richard-at-atomwide.com |log4perl_sourceforge| wrote: > Hi all > > I am trying to capture unhandled exceptions that are sent to STDERR, > e.g. for example the following could would give such an error [snip] > > I can catch this using stealth as loggers outlined in > > http://searc

Re: [log4perl-devel] Log4perl and catching unhandle exceptions but not using 'easy' mode

2009-05-20 Thread Mike Schilli
On Wed, 20 May 2009, Richard Burton wrote: > I can catch this using stealth as loggers outlined in > http://search.cpan.org/~mschilli/Log-Log4perl/lib/Log/Log4perl/FAQ.pm#So > me_module_prints_messages_to_STDERR._How_can_I_funnel_them_to_Log::Log4p > erl? > > but the example assumes you are using

Re: [log4perl-devel] Log4perl - Multiple files and different log levels

2009-01-26 Thread Mike Schilli
On Mon, 26 Jan 2009, Manoj Wanzare wrote: > 3) DEBUG mode should have an option of either writing to Screen > or debuglog file or both I presume that 'debug mode' is a mode your application is in, so it would be available in a variable of the program? If so, you can attach a filter t

Re: [log4perl-devel] Log4perl command line options (fwd)

2008-08-14 Thread Mike Schilli
Mike Schilli wrote: > I have one suggestion: Since -d or -v are used by some scripts for > different purposes, how about letting the script determine which options > are covered? Done. http://search.cpan.org/~ctilmes/Log-Log4perl-CommandLine-0.03/ I've already seen a few things I want to change,

Re: [log4perl-devel] Log4perl command line options (fwd)

2008-08-14 Thread Mike Schilli
On Mon, 4 Aug 2008, Curt Tilmes wrote: > I attended your talk at OSCON about Log4perl (which I enjoyed > immensely, thank you!), Hi Curt, thanks, glad you liked it ;). > and asked a question about command line options rather than config > files. I've thought about it a bit since then, and put

Re: [log4perl-devel] log4perl appenders with warp_message=0

2008-05-15 Thread Mike Schilli
On Tue, 13 May 2008, Erskine, Thomas (IT) wrote: > While warp_message is indeed an appender setting, if you have two > appenders, one with warp_message=0 and one without, then you'll get > the mess I got: the one with will work fine and will have access to > extra args separately, but the one with

Re: [log4perl-devel] log4perl appenders with warp_message=0

2008-05-13 Thread Erskine, Thomas (IT)
Hi Mike. While warp_message is indeed an appender setting, if you have two appenders, one with warp_message=0 and one without, then you'll get the mess I got: the one with will work fine and will have access to extra args separately, but the one without will mash the args into a single message.

Re: [log4perl-devel] log4perl appenders with warp_message=0

2008-05-13 Thread Mike Schilli
On Tue, 13 May 2008, Erskine, Thomas (IT) wrote: > I do indeed want > > $logger->log($level, $msg, $key) > > to be dealt with differently depending on the appender it ends up on. > That's part of the point of having different appenders; they ought to be > independant. The problem is that it

Re: [log4perl-devel] log4perl appenders with warp_message=0 (fwd)

2008-05-13 Thread Mike Schilli
On Fri, 9 May 2008, Erskine, Thomas (IT) wrote: > The other logs an event to Netcool (specifying warp_message=0) and it > works fine. It allows you to call log like: > > $logger->log($level, $msg, $key) > > so that you can specify a Netcool alert key. > > Then comes the problem: I made a conf

Re: [log4perl-devel] log4perl question

2008-02-08 Thread Mike Schilli
On Wed, 6 Feb 2008, Kevin M. Goess wrote: > If you want to send "info" messages too, then do this, changing ERROR > to INFO: > > log4perl.rootLogger=INFO, LOGFILE > > That will send all messages of level "info", "warn", "error" and "fatal" > to your LOGFILE. ... and just in case: if you wan

Re: [log4perl-devel] log4perl question

2008-02-06 Thread Kevin M. Goess
Fernando, if I understand your question correctly, this line that you have: log4perl.rootLogger=ERROR, LOGFILE tells log4perl to send all messages whose log level is "error" or "fatal" to your LOGFILE appender. If you want to send "info" messages too, then do this, changing ERROR to INFO

Re: [log4perl-devel] log4perl causing perl process to die (fwd)

2007-11-06 Thread Kevin M. Goess
Mike Schilli wrote: > I see -- the recommended ways of synchronizing access to an appender are > listed in the Log4perl FAQ: > > http://log4perl.sourceforge.net/d/Log/Log4perl/FAQ.html#23804 Something I learned recently that's apropos that I've been meaning to mention: on Linux, you don't hav

Re: [log4perl-devel] log4perl causing perl process to die (fwd)

2007-11-05 Thread Mike Schilli
PM > To: Strahan, Bob > Cc: Mike Schilli; log4perl-devel@lists.sourceforge.net > Subject: RE: [log4perl-devel] log4perl causing perl process to die (fwd) > > On Sun, 4 Nov 2007, Strahan, Bob wrote: > > > We do use the 'close_after_write' option... As I mentioned, ther

Re: [log4perl-devel] log4perl causing perl process to die (fwd)

2007-11-05 Thread Strahan, Bob
ovember 04, 2007 3:55 PM To: Strahan, Bob Cc: Mike Schilli; log4perl-devel@lists.sourceforge.net Subject: RE: [log4perl-devel] log4perl causing perl process to die (fwd) On Sun, 4 Nov 2007, Strahan, Bob wrote: > We do use the 'close_after_write' option... As I mentioned, there ar

Re: [log4perl-devel] log4perl causing perl process to die (fwd)

2007-11-04 Thread Mike Schilli
"Cannot write to '$self->{filename}': $!"; > while (1) { >last if open $fh, "$self->{mode}$self->{filename}" ; > } > > > > > > > > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf

Re: [log4perl-devel] log4perl causing perl process to die (fwd)

2007-11-04 Thread Strahan, Bob
day, November 03, 2007 6:32 PM To: Mike Schilli Cc: log4perl-devel@lists.sourceforge.net Subject: Re: [log4perl-devel] log4perl causing perl process to die (fwd) On Fri, 2 Nov 2007, Bob Strahan wrote: > However, it seems that if certain filesystem operations are > performed on the logfile it can

Re: [log4perl-devel] log4perl causing perl process to die (fwd)

2007-11-03 Thread Mike Schilli
On Fri, 2 Nov 2007, Bob Strahan wrote: > However, it seems that if certain filesystem operations are > performed on the logfile it can cause the logger to execute die(), > causing my service to die, with the following error > > Cannot write to 'D:/Program Files (x86)/My App/logs/logfile.txt': > Pe

Re: [log4perl-devel] Log4perl Categories

2007-08-17 Thread Lee Goddard
From: Mike Schilli [mailto:[EMAIL PROTECTED] > On Thu, 16 Aug 2007, Lee Goddard wrote: > > > Sometimes I need to just see the logging from a specific > > method/subroutine/function. > > > > I realize I can change the log levels within that block of code, but > > it would be convenient to be able t

Re: [log4perl-devel] Log4perl Categories

2007-08-17 Thread Lee Goddard
Eric [mailto:[EMAIL PROTECTED] Sent: 16 August 2007 16:49 To: Lee Goddard; log4perl-devel@lists.sourceforge.net Subject: RE: [log4perl-devel] Log4perl Categories Lee,   I use a custom logging class that exports a get_logger($category) that automatically prepends the namespace hierarchy to the category p

Re: [log4perl-devel] Log4perl Categories

2007-08-16 Thread Berg, Eric
Lee, I use a custom logging class that exports a get_logger($category) that automatically prepends the namespace hierarchy to the category passed in, so that I can always do this: My logger config file looks kinda like this: log4perl.logger.MyMods.Action.kgc_dir = DEBUG, DebugLog log

Re: [log4perl-devel] Log4perl Categories

2007-08-16 Thread Mike Schilli
On Thu, 16 Aug 2007, Lee Goddard wrote: > Sometimes I need to just see the logging from a specific > method/subroutine/function. > > I realize I can change the log levels within that block of code, but > it would be convenient to be able to say > log4perl.category.bar.twix.eat to just see the logg

Re: [log4perl-devel] Log4Perl Segmentation Faults with Apache1/mod_perl

2007-08-07 Thread Mike Schilli
On Tue, 7 Aug 2007, H. Meyer wrote: > We've been able to "fix" the issue for our local setup. The following > appender caused the segfaults: > > log4perl.appender.STDERR=Log::Dispatch::Screen > log4perl.appender.STDERR.stderr=1 > log4perl.appender.STDERR.layout=Log::Log4perl::Layout::PatternLayou

Re: [log4perl-devel] Log4Perl Segmentation Faults with Apache1/mod_perl

2007-08-07 Thread H. Meyer
Mike Schilli wrote: > On Mon, 6 Aug 2007, H. Meyer wrote: >> I've just encountered very frequent segmentation faults when trying to >> use Log4Perl in a perl web application running inside of apache 1.3.37 >> and mod_perl 1.29. I am using perl 5.8.8 and the latest Log4Perl >> version from CPAN. >

Re: [log4perl-devel] Log4Perl Segmentation Faults with Apache1/mod_perl

2007-08-07 Thread Mike Schilli
On Mon, 6 Aug 2007, H. Meyer wrote: > I've just encountered very frequent segmentation faults when trying to > use Log4Perl in a perl web application running inside of apache 1.3.37 > and mod_perl 1.29. I am using perl 5.8.8 and the latest Log4Perl > version from CPAN. Core dumps are unrelated to