From: King, J. X -N. <Jam...@di...> - 2003-10-17 01:27:55
|
Excellent product. It has taken me months to build a logger similar to this. I would like to convert, however does log4perl support a Solaris 5.6 environment running a 5.005.03 version of Perl? Thanks, - James King Software Engineer |
From: Fernando S. <fer...@gm...> - 2008-02-06 10:49:52
|
Hi all, probably you can give some help on this topic. I'm using the Log-Log4perl-1.14 and I've initialize the following log.conffile: [root@ test]# cat log.conf ############################################################ # A simple root logger with a Log::Log4perl::Appender::File # file appender in Perl. ############################################################ log4perl.rootLogger=ERROR, LOGFILE log4perl.appender.LOGFILE=Log::Log4perl::Appender::File log4perl.appender.LOGFILE.filename=/tmp/myerrs.log log4perl.appender.LOGFILE.mode=append log4perl.appender.LOGFILE.layout=PatternLayout log4perl.appender.LOGFILE.layout.ConversionPattern=%d %p> %F{1}:%L %M - %m%n With this setup, log4perl will catch all Errros and stores it at /tmp/myerrs.log file. My intention is to capture ERRORs and also the INFOs traces. Something like "log4perl.rootLogger=ERROR and INFO, LOGFILE". Is it possible to do ?? if yes, how it does?? Best Regards, Fernando |
From: Kevin M. G. <cp...@go...> - 2008-02-06 18:21:32
|
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: log4perl.rootLogger=INFO, LOGFILE That will send all messages of level "info", "warn", "error" and "fatal" to your LOGFILE. Does that answer your question? Fernando Sousa wrote: > Hi all, > > probably you can give some help on this topic. > I'm using the Log-Log4perl-1.14 and I've initialize the following > log.conf file: > > [root@ test]# cat log.conf > ############################## > ############################## > # A simple root logger with a Log::Log4perl::Appender::File > # file appender in Perl. > ############################################################ > > log4perl.rootLogger=ERROR, LOGFILE > > log4perl.appender.LOGFILE=Log::Log4perl::Appender::File > log4perl.appender.LOGFILE.filename=/tmp/myerrs.log > log4perl.appender.LOGFILE.mode=append > > log4perl.appender.LOGFILE.layout=PatternLayout > log4perl.appender.LOGFILE.layout.ConversionPattern=%d %p> %F{1}:%L %M - %m%n > > > With this setup, log4perl will catch all Errros and stores it at > /tmp/myerrs.log file. > My intention is to capture ERRORs and also the INFOs traces. > Something like "log4perl.rootLogger=ERROR and INFO, LOGFILE". > > Is it possible to do ?? if yes, how it does?? > > > Best Regards, > Fernando > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel |
From: Mike S. <m...@pe...> - 2008-02-08 08:50:52
|
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 want to capture INFO messages in one file, and ERROR messages in another, here's the answer to that: http://log4perl.sourceforge.net/d/Log/Log4perl/FAQ.html#c7fa8 -- Mike Mike Schilli m...@pe... > > Does that answer your question? > > Fernando Sousa wrote: > > Hi all, > > > > probably you can give some help on this topic. > > I'm using the Log-Log4perl-1.14 and I've initialize the following > > log.conf file: > > > > [root@ test]# cat log.conf > > ############################## > > ############################## > > # A simple root logger with a Log::Log4perl::Appender::File > > # file appender in Perl. > > ############################################################ > > > > log4perl.rootLogger=ERROR, LOGFILE > > > > log4perl.appender.LOGFILE=Log::Log4perl::Appender::File > > log4perl.appender.LOGFILE.filename=/tmp/myerrs.log > > log4perl.appender.LOGFILE.mode=append > > > > log4perl.appender.LOGFILE.layout=PatternLayout > > log4perl.appender.LOGFILE.layout.ConversionPattern=%d %p> %F{1}:%L %M - %m%n > > > > > > With this setup, log4perl will catch all Errros and stores it at > > /tmp/myerrs.log file. > > My intention is to capture ERRORs and also the INFOs traces. > > Something like "log4perl.rootLogger=ERROR and INFO, LOGFILE". > > > > Is it possible to do ?? if yes, how it does?? > > > > > > Best Regards, > > Fernando > > > > > > ------------------------------------------------------------------------ > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > log4perl-devel mailing list > > log...@li... > > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > |
From: Mike S. <msc...@ao...> - 2003-10-17 04:02:05
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> </head> <body> <font face="Arial,sans-serif"><font size="2"><span type="cite">King, James X -ND wrote on 10/16/2003, 6:24 PM:</span> </font></font> <p><font face="Arial,sans-serif" size="2"></font></p> <blockquote type="cite" ><font face="Arial,sans-serif" size="2"></font> <p class="MsoNormal"><font size="2" face="Arial"><span font-family:arial="">Excellent product. It has taken me months to build a logger similar to this. I would like to convert, however does log4perl support a Solaris 5.6 environment running a </span></font><font size="2" face="Courier New"><span>5.005.03 version of Perl?</span></font></p> <font face="Arial,sans-serif" size="2"></font> <p class="MsoNormal"><font size="2" face="Courier New"><span font-family="" courier="" new="" '=""></span></font></p> </blockquote> <font face="Arial,sans-serif"><font size="2">Thanks! We're actively supporting 5.005_03 and Solaris. Give it a try and run the huge test suite that comes with it!<br> <br> <span>-- <br> -- Mike<br> Mike Schilli<br> <a class="moz-txt-link-abbreviated" href="mailto:m...@pe...">m...@pe...</a></span></font></font> </body> </html> |
From: Jim C. <jc...@di...> - 2003-10-17 05:14:50
|
Mike Schilli wrote: > King, James X -ND wrote on 10/16/2003, 6:24 PM: > >> Excellent product. It has taken me months to build a logger similar >> to this. I would like to convert, however does log4perl support a >> Solaris 5.6 environment running a 5.005.03 version of Perl? >> > Thanks! We're actively supporting 5.005_03 and Solaris. Give it a try > and run the huge test suite that comes with it! > as of 0.37, there is a use 5.006 clause, and there are a lot of uses of 'our' variables, which IIRC is a 5.6 feature. [jimc@harpo jimc]$ perldoc -m Log::Log4perl |grep -n use 5:use 5.006; that said, Mike is certainly 'qualified' to current development efforts ;-), and 0.38 may have already been released (I havent watched closely lately) you might just try to comment out the use 5.006 and the use strict, and see what happens. Id have given a perl -pi.bak -e one-liner, but multiline declarations would defeat the line-at-a-time operation of -p in this context. our %ALLOWED_CODE_OPS = ( 'safe' => [ ':browse' ], 'restrictive' => [ ':default' ], ); FYI, since youre looking to convert an existing code-base to use this shiny new module, you should look into wrapping it in an adaptor class. Log4perl has support for it, its really simple to use, I did so in <shameless plug> Log::Log4perl::AutoCategorize, now on CPAN. My module uses features from 5.8.0, so its not directly useful for your needs. # set this to '1' if you're using a wrapper # around Log::Log4perl our $caller_depth = 0; (all code-quotes are from same file, as on prompt above) |
From: Mike S. <msc...@ao...> - 2003-10-17 06:29:37
|
Jim Cromie wrote on 10/16/2003, 10:15 PM: > as of 0.37, there is a use 5.006 clause, and there are a lot of uses > for 'our' variables, > which IIRC is a 5.6 feature. That's taken care of. No manual interaction is required. Here's how this works: If you're running perl 5.005_03 and start the standard installation procedure via perl Makefile.PL it will detect that you're running 5.005_03 and will adapt the distribution for 5.005_03 accordingly. In fact, it will take out all 'our' variables and clear the 'use' statements - try it. -- -- Mike Mike Schilli m...@pe... |