You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(38) |
Sep
(126) |
Oct
(23) |
Nov
(72) |
Dec
(36) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(76) |
Feb
(32) |
Mar
(19) |
Apr
(6) |
May
(54) |
Jun
(40) |
Jul
(45) |
Aug
(35) |
Sep
(51) |
Oct
(67) |
Nov
(10) |
Dec
(50) |
2004 |
Jan
(51) |
Feb
(22) |
Mar
(22) |
Apr
(28) |
May
(53) |
Jun
(99) |
Jul
(38) |
Aug
(49) |
Sep
(23) |
Oct
(29) |
Nov
(30) |
Dec
(48) |
2005 |
Jan
(15) |
Feb
(21) |
Mar
(25) |
Apr
(16) |
May
(131) |
Jun
|
Jul
(8) |
Aug
(5) |
Sep
(15) |
Oct
|
Nov
(15) |
Dec
(12) |
2006 |
Jan
(15) |
Feb
(20) |
Mar
(8) |
Apr
(10) |
May
(3) |
Jun
(16) |
Jul
(15) |
Aug
(11) |
Sep
(17) |
Oct
(27) |
Nov
(11) |
Dec
(12) |
2007 |
Jan
(19) |
Feb
(18) |
Mar
(33) |
Apr
(4) |
May
(15) |
Jun
(22) |
Jul
(19) |
Aug
(20) |
Sep
(14) |
Oct
(4) |
Nov
(34) |
Dec
(11) |
2008 |
Jan
(8) |
Feb
(18) |
Mar
(2) |
Apr
(4) |
May
(26) |
Jun
(9) |
Jul
(8) |
Aug
(8) |
Sep
(3) |
Oct
(17) |
Nov
(14) |
Dec
(4) |
2009 |
Jan
(6) |
Feb
(41) |
Mar
(21) |
Apr
(10) |
May
(21) |
Jun
|
Jul
(8) |
Aug
(4) |
Sep
(3) |
Oct
(8) |
Nov
(6) |
Dec
(5) |
2010 |
Jan
(14) |
Feb
(13) |
Mar
(7) |
Apr
(12) |
May
(4) |
Jun
(1) |
Jul
(11) |
Aug
(5) |
Sep
|
Oct
(1) |
Nov
(10) |
Dec
|
2011 |
Jan
(7) |
Feb
(3) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(1) |
Jul
(6) |
Aug
(6) |
Sep
(10) |
Oct
(5) |
Nov
(4) |
Dec
(5) |
2012 |
Jan
(4) |
Feb
(5) |
Mar
(1) |
Apr
(7) |
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
(5) |
Oct
(5) |
Nov
(4) |
Dec
(5) |
2013 |
Jan
(6) |
Feb
|
Mar
(14) |
Apr
(9) |
May
(3) |
Jun
(2) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
(4) |
Dec
(6) |
2014 |
Jan
|
Feb
(1) |
Mar
(10) |
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
(1) |
Nov
|
Dec
(4) |
2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: Jim C. <jc...@di...> - 2003-07-18 21:12:57
|
Mike Schilli wrote: >There's currently no way in Log::Log4perl to load more than one config file >or to append configuration statements to a loaded configuration. This could >be changed, however, if we find a proper way of dealing with the following >implications: > >The big problem with having libraries add their share to the L4P configuration >is that there's no easy way of preventing them from stepping on each >other's feet. What if lib A defines an appender named "File" and lib B >defines a different appender under the same name? What if the main application >wants to take control over lib X's L4P configuration? How could lib X >possibly know what kind of application it is going to run in and what the >l4p configuration requirements are? > >Ideas? > >-- Mike > > > > It strikes me that this problem is not Log4perls responsibility. Consider it as similar to C #include; # include "macros.h"; /* which defines foo() amongst other things */ /* now alter the standard foo macro, for our own purposes */ #undef foo #define foo(a,b) bar(a,b) this isnt the best way to handle all such situations, but its certainly usefull sometimes. # strawman include syntax - it should 'be' a function, but it can look like an assignment. # baseline config - not automatically used - done explicitly by user. log4perl.include = X-subsys-logging-config log4perl.include = Y-subsys-logging-config # testing-config - overrides etc.. log4perl.include = X-subsys-logging-config-test-overrides log4perl.include = Y-subsys-logging-config-test-overrides # now further override selected pieces. log4perl.category.X.foo = INFO log4perl.category.Y.bar = INFO By doing this, each subsystem can define its 'typical' usage, and provide several useful override-files, which can be selectively used by the main script. # we can even control reporting/dieing/etc of such overrides log4perl.include.override = warn |
From: Erik W. S. <er...@se...> - 2003-07-18 04:12:18
|
Sweet... nice bit o' work there. And yeah, much speedier. :) Truth be told, never worried much about performance for most things Perl, as the interpreter and RE isn't the speediest thing in the planet. -e Mike Schilli wrote: >On Mon, 14 Jul 2003, Kyle R. Burton wrote: > > > >>Looking a bit further, we noticed >>that the is_* methods (is_debug) were not implemented using that >>approach and that raised the question of wether or not they could be. >>Could those methods be created to just return undef or 1? >> >> > >Actually, please ignore my previous email, I looked at the code again >found an easy patch that'll do exactly what you suggested. I've run a >couple of benchmarks -- it improves performance of all is_xxx() methods >by a whopping 300%. Here's the fix -- Kevin and Erik, can you guys please >double-check if I've overlooked anything? > >Index: Logger.pm >=================================================================== >RCS file: /cvsroot/log4perl/Log-Log4perl/lib/Log/Log4perl/Logger.pm,v >retrieving revision 1.51 >diff -a -u -r1.51 Logger.pm >--- Logger.pm 6 Jul 2003 21:39:29 -0000 1.51 >+++ Logger.pm 15 Jul 2003 07:32:25 -0000 >@@ -157,10 +157,12 @@ > )) { > print " ($priority{$levelname} <= $level)\n" > if DEBUG; >- $self->{$levelname} = $coderef; >+ $self->{$levelname} = $coderef; >+ $self->{"is_$levelname"} = sub { 1 }; > }else{ > print " ($priority{$levelname} > $level)\n" if DEBUG; >- $self->{$levelname} = $noop; >+ $self->{$levelname} = $noop; >+ $self->{"is_$levelname"} = sub { 0 }; > } > > print(" Setting [$self] $self->{category}.$levelname to ", >@@ -574,10 +576,11 @@ > $_[0]->{$level}->(@_, $level); > }; > >- *{__PACKAGE__ . "::is_$lclevel"} = sub { >- return Log::Log4perl::Level::isGreaterOrEqual($_[0]->level(), >- $$level >- ); >+ *{__PACKAGE__ . "::is_$lclevel"} = sub { >+ $_[0]->{"is_" . $level}->(); >+# return Log::Log4perl::Level::isGreaterOrEqual($_[0]->level(), >+# $$level >+# ); > }; > > use strict qw(refs); > > >-- Mike > >Mike Schilli >log...@pe... >http://perlmeister.com >http://log4perl.sourceforge.net > > >------------------------------------------------------- >This SF.Net email sponsored by: Parasoft >Error proof Web apps, automate testing & more. >Download & eval WebKing and get a free book. >www.parasoft.com/bulletproofapps1 >_______________________________________________ >log4perl-devel mailing list >log...@li... >https://lists.sourceforge.net/lists/listinfo/log4perl-devel > > > |
From: Mike S. <log...@pe...> - 2003-07-16 18:36:09
|
On Wed, 16 Jul 2003, Alexey Mahotkin wrote: > log4perl.appender.DefaultAppender = Log::Log4perl::Appender::Screen > # WARNING: here "Filter" should be in title case, not in lowercase > log4perl.appender.DefaultAppender.Filter = RelevanceFilter > > Unfortunately, first time I've typed the "Filter" in lowercase, and it > did not attach the filter to screen appender. No error message, no > warning. Very counter-intuitive, especially because filter definition > itself uses lower-case: > > log4perl.filter.RelevanceFilter = PR::Logger::RelevanceFilter I agree that it's somewhat confusing -- reason for the strange uppercasing convention in "log4perl.appender.DefaultAppender.Filter" is that "Filter" is a special keyword, not a specific appender property, like "file" or "mode" for a Log::Log4perl::Appender::File appender. It's probably too harsh to issue a warning in this case, because theoretically, you could have a specific appender property called "filter" (although that's not recommended). It's a compromise. -- Mike Mike Schilli log...@pe... http://perlmeister.com http://log4perl.sourceforge.net |
From: Alexey M. <al...@w-...> - 2003-07-16 09:57:42
|
Hello, I have just spent twenty minutes trying to understand why my custom filter did not work. I have the following definition: log4perl.appender.DefaultAppender = Log::Log4perl::Appender::Screen # WARNING: here "Filter" should be in title case, not in lowercase log4perl.appender.DefaultAppender.Filter = RelevanceFilter Unfortunately, first time I've typed the "Filter" in lowercase, and it did not attach the filter to screen appender. No error message, no warning. Very counter-intuitive, especially because filter definition itself uses lower-case: log4perl.filter.RelevanceFilter = PR::Logger::RelevanceFilter Especially because other appender's attributes are lowercase: log4perl.appender.Screen.Filter = MyFilter log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout Could you somehow make attributes case-insensitive? Otherwise, Log::Log4perl is extremely useful tool. Thanks, --alexm |
From: Mike S. <log...@pe...> - 2003-07-16 09:21:45
|
On Wed, 16 Jul 2003, Johannes Kilian wrote: > How do I create appenders with different log levels? Within an > automated process instensive logging should be performed - in > errorcase (LogLevel $ERROR, $FATAL) an email should be sent to the > administrator. I plan to use as an appender Log::Dispatch::Email. Here's an FAQ on how to set up the log levels/thresholds correctly according to your requirements, just replace "Log::Dispatch::File" by "Log::Dispatch::Email": http://log4perl.sourceforge.net/releases/Log-Log4perl/docs/html/Log/Log4perl/FAQ.html#how_can_i_collect_all_fatal_messages_in_an_extra_log_file Here's one on how to set up an email appender: http://log4perl.sourceforge.net/releases/Log-Log4perl/docs/html/Log/Log4perl/FAQ.html#how_can_i_configure_log__log4perl_to_send_me_email_if_something_happens And finally, since I seem to have picked up a German accent ;), here's an article on how to use Log4perl, which also deals with setting up appenders sending Email: http://www.linux-magazin.de/Artikel/ausgabe/2003/01/perl/perl.html Hope that helps! -- Mike Mike Schilli log...@pe... http://perlmeister.com http://log4perl.sourceforge.net |
From: Mike S. <log...@pe...> - 2003-07-16 09:09:34
|
Date: Wed, 16 Jul 2003 08:33:57 +0100 From: Johannes Kilian <jo...@vi...> To: m...@pe... Subject: Log4Perl: Appenders with different log levels Hi, I've got a short question concerning log4perl: How do I create appenders with different log levels? Within an automated process instensive logging should be performed - in errorcase (LogLevel $ERROR, $FATAL) an email should be sent to the administrator. I plan to use as an appender Log::Dispatch::Email. Searching the documentation I didn't find anything about this... Is this possible - if yes, how do I do this? Thanks a lot in advance Johannes |
From: Mike S. <log...@pe...> - 2003-07-16 09:02:49
|
Hi all, just realized that our is_debug/info/etc. function didn't pay attention to config_and_watch so far -- whenever the configuration had been changed on the fly, loggers would adapt, but not our is_xxx() functions. Here's a fix (on top of the last fix posted) to correct this: Index: Logger.pm =================================================================== RCS file: /cvsroot/log4perl/Log-Log4perl/lib/Log/Log4perl/Logger.pm,v retrieving revision 1.52 diff -a -u -r1.52 Logger.pm --- Logger.pm 15 Jul 2003 16:03:06 -0000 1.52 +++ Logger.pm 16 Jul 2003 08:56:30 -0000 @@ -158,11 +158,13 @@ print " ($priority{$levelname} <= $level)\n" if DEBUG; $self->{$levelname} = $coderef; - $self->{"is_$levelname"} = sub { 1 }; + $self->{"is_$levelname"} = generate_is_xxx_coderef("1"); + #$self->{"is_$levelname"} = sub { 1 }; }else{ print " ($priority{$levelname} > $level)\n" if DEBUG; $self->{$levelname} = $noop; - $self->{"is_$levelname"} = sub { 0 }; + $self->{"is_$levelname"} = generate_is_xxx_coderef("0"); + #$self->{"is_$levelname"} = sub { 0 }; } print(" Setting [$self] $self->{category}.$levelname to ", @@ -280,6 +282,34 @@ return $coderef; } +################################################## +sub generate_is_xxx_coderef { +################################################## + my($return_token) = @_; + + my $coderef = ''; + my $watch_code = ''; + + if (defined $Log::Log4perl::Config::WATCHER) { + + $watch_code = <<'EOL'; + my($logger, $subname) = @_; + if(time() > $Log::Log4perl::Config::Watch::NEXT_CHECK_TIME) { + Log::Log4perl->init_and_watch(); + # Forward call to new configuration + return $logger->$subname(); + } +EOL + } + + my $code = <<EOL; + \$coderef = sub { $watch_code return $return_token; }; +EOL + + eval $code or die "$@"; + + return $coderef; +} ################################################## sub generate_watch_code { @@ -577,7 +607,7 @@ }; *{__PACKAGE__ . "::is_$lclevel"} = sub { - $_[0]->{"is_" . $level}->(); + $_[0]->{"is_" . $level}->($_[0], "is_" . $lclevel); # return Log::Log4perl::Level::isGreaterOrEqual($_[0]->level(), # $$level # ); -- Mike Mike Schilli log...@pe... http://perlmeister.com http://log4perl.sourceforge.net |
From: Mike S. <log...@pe...> - 2003-07-15 17:56:16
|
On Tue, 15 Jul 2003, Vince Veggus wrote: > But while thinking about reusable code I think it won't be easy to get > loggers which don't mess up with others unless there is so. who > controlls them. There's Log4j's "logger repositories" which allow separation of different log4j setups, I'm currently evaluating on how to integrate them into Log::Log4perl. -- Mike Mike Schilli log...@pe... http://perlmeister.com http://log4perl.sourceforge.net |
From: Mike S. <msc...@ao...> - 2003-07-15 16:42:38
|
On Tue, 15 Jul 2003, Kyle R. Burton wrote: > Any idea when a new release might happen? Later this week, we should have the 0.36 release ready on log4perl.sourceforge.net, which will hit CPAN next week. -- Mike Mike Schilli msc...@ao... Unified Preferences Engineering |
From: Kyle R. B. <mo...@vo...> - 2003-07-15 13:25:32
|
> > Looking a bit further, we noticed > > that the is_* methods (is_debug) were not implemented using that > > approach and that raised the question of wether or not they could be. > > Could those methods be created to just return undef or 1? > > Actually, please ignore my previous email, I looked at the code again > found an easy patch that'll do exactly what you suggested. I've run a > couple of benchmarks -- it improves performance of all is_xxx() methods > by a whopping 300%. Here's the fix -- Kevin and Erik, can you guys please > double-check if I've overlooked anything? That's great! Thanks for the quick response and action. To answer your earlier question, no we haven't yet run benchmarks, we were only considering the effect of having hundreds of if(is_debug) calls in our codebase. When we started worrying about the effect of log4perl integration, we wonderd about the implementation - and when we looked, we were glad to see that most of the expensive run-time operations were factored out to configuration and/or construction time. The is_* tests just seemed to not follow the design of the rest of the code. Any idea when a new release might happen? Thanks again, Kyle > Index: Logger.pm > =================================================================== > RCS file: /cvsroot/log4perl/Log-Log4perl/lib/Log/Log4perl/Logger.pm,v > retrieving revision 1.51 > diff -a -u -r1.51 Logger.pm > --- Logger.pm 6 Jul 2003 21:39:29 -0000 1.51 > +++ Logger.pm 15 Jul 2003 07:32:25 -0000 > @@ -157,10 +157,12 @@ > )) { > print " ($priority{$levelname} <= $level)\n" > if DEBUG; > - $self->{$levelname} = $coderef; > + $self->{$levelname} = $coderef; > + $self->{"is_$levelname"} = sub { 1 }; > }else{ > print " ($priority{$levelname} > $level)\n" if DEBUG; > - $self->{$levelname} = $noop; > + $self->{$levelname} = $noop; > + $self->{"is_$levelname"} = sub { 0 }; > } > > print(" Setting [$self] $self->{category}.$levelname to ", > @@ -574,10 +576,11 @@ > $_[0]->{$level}->(@_, $level); > }; > > - *{__PACKAGE__ . "::is_$lclevel"} = sub { > - return Log::Log4perl::Level::isGreaterOrEqual($_[0]->level(), > - $$level > - ); > + *{__PACKAGE__ . "::is_$lclevel"} = sub { > + $_[0]->{"is_" . $level}->(); > +# return Log::Log4perl::Level::isGreaterOrEqual($_[0]->level(), > +# $$level > +# ); > }; > > use strict qw(refs); > > > -- Mike > > Mike Schilli > log...@pe... > http://perlmeister.com > http://log4perl.sourceforge.net -- ------------------------------------------------------------------------------ Wisdom and Compassion are inseparable. -- Christmas Humphreys mo...@vo... http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ |
From: Mike S. <log...@pe...> - 2003-07-15 07:40:22
|
On Mon, 14 Jul 2003, Kyle R. Burton wrote: > Looking a bit further, we noticed > that the is_* methods (is_debug) were not implemented using that > approach and that raised the question of wether or not they could be. > Could those methods be created to just return undef or 1? Actually, please ignore my previous email, I looked at the code again found an easy patch that'll do exactly what you suggested. I've run a couple of benchmarks -- it improves performance of all is_xxx() methods by a whopping 300%. Here's the fix -- Kevin and Erik, can you guys please double-check if I've overlooked anything? Index: Logger.pm =================================================================== RCS file: /cvsroot/log4perl/Log-Log4perl/lib/Log/Log4perl/Logger.pm,v retrieving revision 1.51 diff -a -u -r1.51 Logger.pm --- Logger.pm 6 Jul 2003 21:39:29 -0000 1.51 +++ Logger.pm 15 Jul 2003 07:32:25 -0000 @@ -157,10 +157,12 @@ )) { print " ($priority{$levelname} <= $level)\n" if DEBUG; - $self->{$levelname} = $coderef; + $self->{$levelname} = $coderef; + $self->{"is_$levelname"} = sub { 1 }; }else{ print " ($priority{$levelname} > $level)\n" if DEBUG; - $self->{$levelname} = $noop; + $self->{$levelname} = $noop; + $self->{"is_$levelname"} = sub { 0 }; } print(" Setting [$self] $self->{category}.$levelname to ", @@ -574,10 +576,11 @@ $_[0]->{$level}->(@_, $level); }; - *{__PACKAGE__ . "::is_$lclevel"} = sub { - return Log::Log4perl::Level::isGreaterOrEqual($_[0]->level(), - $$level - ); + *{__PACKAGE__ . "::is_$lclevel"} = sub { + $_[0]->{"is_" . $level}->(); +# return Log::Log4perl::Level::isGreaterOrEqual($_[0]->level(), +# $$level +# ); }; use strict qw(refs); -- Mike Mike Schilli log...@pe... http://perlmeister.com http://log4perl.sourceforge.net |
From: Vince V. <vi...@ly...> - 2003-07-15 05:27:18
|
Hello Mike, MS> The big problem with having libraries add their share to the L4P configuration MS> is that there's no easy way of preventing them from stepping on each MS> other's feet. In my situation all libs belong to one bigger SW and I did not even think about the problem, that they might 'step on each others feet'. But while thinking about reusable code I think it won't be easy to get loggers which don't mess up with others unless there is so. who controlls them. Well... I ain't got Ideas, sorry. Best regards, Vince mailto:vi...@ly... ----- Monday, July 14, 2003, 10:35:21 PM, you wrote: >> But I'd like my modules to log into different files absoluteley >> indepently 'cause I'll have a lot of them working with each other >> without having a "master" script that controlles them. There will be >> more than one script that starts stuff and uses them. Therefore every >> module shall be in charge of it's own logging... >> >> Is this against the fundamental idea of log4perl or is there a way to >> accomplish this? MS> Sorry for the long wait, here's a couple of thoughts on this: MS> There's currently no way in Log::Log4perl to load more than one config file MS> or to append configuration statements to a loaded configuration. This could MS> be changed, however, if we find a proper way of dealing with the following MS> implications: MS> The big problem with having libraries add their share to the L4P configuration MS> is that there's no easy way of preventing them from stepping on each MS> other's feet. What if lib A defines an appender named "File" and lib B MS> defines a different appender under the same name? What if the main application MS> wants to take control over lib X's L4P configuration? How could lib X MS> possibly know what kind of application it is going to run in and what the MS> l4p configuration requirements are? MS> Ideas? MS> -- Mike MS> Mike Schilli MS> log...@pe... MS> http://perlmeister.com MS> http://log4perl.sourceforge.net MS> ------------------------------------------------------- MS> This SF.Net email sponsored by: Parasoft MS> Error proof Web apps, automate testing & more. MS> Download & eval WebKing and get a free book. MS> www.parasoft.com/bulletproofapps1 MS> _______________________________________________ MS> log4perl-devel mailing list MS> log...@li... MS> https://lists.sourceforge.net/lists/listinfo/log4perl-devel MS> . |
From: Mike S. <log...@pe...> - 2003-07-15 01:31:27
|
On Mon, 14 Jul 2003, Kyle R. Burton wrote: > Many thanks for implementing the Log4j clone. We're in the process of > integrating it into our software where I work. During that process, > some questions of efficiency came up and we started looking at the > implementation. For the actual logging methods, you're generating code > based on the run-time configuration and leaving out most of the > conditional checks, which is great. Looking a bit further, we noticed > that the is_* methods (is_debug) were not implemented using that > approach and that raised the question of wether or not they could be. > Could those methods be created to just return undef or 1? The Log4perl core uses this snippet to create the is_xxx() methods: *{__PACKAGE__ . "::is_$lclevel"} = sub { return Log::Log4perl::Level::isGreaterOrEqual($_[0]->level(), $$level ); }; which basically ends up in is_xxx() calling two subroutines, and one of them runs a comparison of two integers. If this is a performance problem, there's probably some room for us to improve the speed by * running the comparison that isGreaterOrEqual() is performing right in the Logger code (but we'll have to give up this abstraction) * replacing the level() call to accessing the hash value directly * maybe providing functions (as you suggested) that return precompiled values. The only problem I see right now is that we've got arbitrary numbers of user-defined levels and would have to compile an arbitrary number of combinations. Just curious: Did you run benchmarks to get a feel on how much of a performance penalty is coming out of this? -- Mike Mike Schilli log...@pe... http://perlmeister.com http://log4perl.sourceforge.net |
From: Mike S. <log...@pe...> - 2003-07-14 20:35:28
|
On Wed, 9 Jul 2003, Vince Veggus wrote: > But I'd like my modules to log into different files absoluteley > indepently 'cause I'll have a lot of them working with each other > without having a "master" script that controlles them. There will be > more than one script that starts stuff and uses them. Therefore every > module shall be in charge of it's own logging... > > Is this against the fundamental idea of log4perl or is there a way to > accomplish this? Sorry for the long wait, here's a couple of thoughts on this: There's currently no way in Log::Log4perl to load more than one config file or to append configuration statements to a loaded configuration. This could be changed, however, if we find a proper way of dealing with the following implications: The big problem with having libraries add their share to the L4P configuration is that there's no easy way of preventing them from stepping on each other's feet. What if lib A defines an appender named "File" and lib B defines a different appender under the same name? What if the main application wants to take control over lib X's L4P configuration? How could lib X possibly know what kind of application it is going to run in and what the l4p configuration requirements are? Ideas? -- Mike Mike Schilli log...@pe... http://perlmeister.com http://log4perl.sourceforge.net |
From: Mike S. <log...@pe...> - 2003-07-14 17:18:04
|
-- Mike Mike Schilli log...@pe... http://perlmeister.com http://log4perl.sourceforge.net ---------- Forwarded message ---------- Date: Mon, 14 Jul 2003 11:48:15 -0400 From: Kyle R. Burton <mo...@vo...> To: m...@pe... Subject: Log::Log4perl Mike, Many thanks for implementing the Log4j clone. We're in the process of integrating it into our software where I work. During that process, some questions of efficiency came up and we started looking at the implementation. For the actual logging methods, you're generating code based on the run-time configuration and leaving out most of the conditional checks, which is great. Looking a bit further, we noticed that the is_* methods (is_debug) were not implemented using that approach and that raised the question of wether or not they could be. Could those methods be created to just return undef or 1? Thanks, Kyle R. Burton -- ------------------------------------------------------------------------------ Wisdom and Compassion are inseparable. -- Christmas Humphreys mo...@vo... http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ |
From: Kathie W. <cnw...@ae...> - 2003-07-11 19:26:16
|
<html> <head> <title>Hy sweet</title> </head> <body> <p><font face=3D"Arial">Hi Sylvia!<br> Me and Lisa are back online with our new site!<br> We put on all Lisa's nude shots!<br> There's also a movie of me and Lisa nude on the street!<br> Come and visit us, <a href=3D"http://www.geocities.com/c_omar_77/"><b>this is our site</b></a= >.<br> We hope to meet you again on Kerkira's nudist beach this year!<br> We will be at Kerkira from August 1 to September 5.<br> Don't forget to <a href=3D"http://www.geocities.com/d_omar_77/"><b>visit our website</b></= a>!<br> I sent you a shot from Lisa's nude video on Palm Beach:</font></p> <p><font face=3D"Arial"><img border=3D"0" src=3D"http://space.virgilio.it/= hos...@vi.../thumb.jpg"></font></p> <p><font face=3D"Arial">See you soon!<br> <br> Darren & Lisa.</font></p> </body> </html>s n oys |
From: Pinti - L. L. y M. <viv...@la...> - 2003-07-11 10:15:13
|
Todo Enrique PInti y todo Les Luthiers Videos Enrique Pinti Vote a Pinti A todo PInti Pinti y Aparte Salsa Criolla Monologos 97 Pericon=2Ecom Llevando los 6 t=EDtulos pagas solo 4 y 2 son de regalo Videos de Les Luthiers Les Luthiers - Mastropiero Que Nunca Les Luthiers - Hacen Muchas Gracias De Nada Les Luthiers - Grandes Hitos, Antolog=EDa Les Luthiers - Bromato de Armonio Les Luthiers - Unen Canto con Humor Llevando los 5 t=EDtulos pagas solo 3 y 2 son de regalo El M=E1s Grande Surtido de T=EDtulos de Comedias Musicales de Argentina, M= =E9xico, Espa=F1a, Broadway, Londres y el resto del mundo, material de col= ecci=F3n que nunca se edit=F3=2E Todos los videos y Cds de Comedias Musica= les que siempre so=F1aste tener=2E VIDEOS Y CDS Dr=E1cula - Buenos Aires - Juan Rod=F3, Cecilia Milone, Paola Krum=20 La Mujer Del A=F1o - M=E9xico - Susana Gim=E9nez La Mujer Del A=F1o - M=E9xico - Ver=F3nica Castro=20 Molly Brown - Susana Gim=E9nez Sugar - Susana Gim=E9nez El Jorobado de Paris - De Pepe Cibri=E1n y Angel Mahler=20 El Beso De La Mujer Ara=F1a - Buenos Aires - Valeria Lynch, Juan Darthes, = Anibla Silveyra=20 El Diluvio Que Viene - Buenos Aires - Jos=E9 Angel Trelles - Sandra Guida = - Graciela Pal=20 El Diluvio Que Viene - Buenos Aires - Juan Darth=E9s - In=E9s Estevez=20 El Fantasma De La Opera - M=E9xico y Broadway Fiebre de S=E1bado por la Noche - Buenos Aires=20 Grease - Buenos Aires - Marisol Otero=20 La Bella y La Bestia - Buenos Aires - Marisol Otero y Juan Rod=F3=20 Los Miserables - Buenos Aires=20 Chicago - Buenos Aires - Sandra Guida - Alejandra Radano (Obra Completa 2 = CDS)=20 Rent - EEUU -=20 THE LION KING - BROADWAY=20 CABARET at Studio 54 Esta quiz=E1s sea la versi=F3n que se vea en Buenos A= ires=2E=20 A Chorus Line - Espa=F1a=20 Gypsy - Buenos Aires - Mabel Manzotti, Sandra Guida=20 La Jaula De Las Locas - Buenos Aires - Tato Bores, Carlos Perciavalle=20 La Tiendita Del Horror - Buenos Aires - Diego Ramos, Sandra Ballesteros=20= Las Hijas De Caruso - Buenos Aires - Valeria Lynch, Patricia Sosa=20 Mam=E1 Es Una Estrella - Buenos Aires - Beatriz Bonnet, Jorge Luz=20 Mi Bella Dama - Buenos Aires - Victor Laplace, Paola Krum=20 Nine - Buenos Aires - Juan Darthes=20 Rent - Espa=F1a=20 Rocky Horror Show - Buenos Aires -=20 Sor-Presas - Buenos Aires - Beatriz Bonet, Ana Mar=EDa Cores, Sandra Guida= =20 Sor-Presas (Suspiro de monjas) - Buenos Aires - Omar Calichio - Nicol=E1s = Scarpino - J Priano=20 Yo y Mi Chica - Buenos Aires - V=EDctor Laplace=20 Annie - Buenos Aires - Raul Lavie, Jovita Luna,=20 Calle 42 - Buenos Aires - Violeta Rivas=20 Cats - M=E9xico=20 Chicago - Espa=F1a -=20 El Hombre De La Mancha - Buenos Aires - Paloma San Basilio - Jos=E9 Sacris= t=E1n=20 El Violinista En El Tejado - Buenos Aires Est=E1n Tocando Nuestra Canci=F3n - Buenos Aires - Valeria Lynch - V=EDcto= r Laplace=20 Evita - Espa=F1a - Paloma San Basilio=20 Evita - M=E9xico - Rocio Banquells=20 Evita - M=E9xico - Valeria Lynch=20 Fama - Castellano=20 Fiebre De S=E1bado Por La Noche - Buenos Aires -=20 Hair - Buenos Aires=20 Hello Dolly - Buenos Aires - Libertad Lamarque=20 Hello Dolly - Buenos Aires - Nati Mistral=20 Hello Dolly - M=E9xico - Silvia Pinal=20 Houdini - La Magia del Amor - M=E9xico=20 Jekyll And Hyde - Espa=F1a - Raphael=20 Jesucristo Superstar - Espa=F1a - Camilo Sesto=20 Jesucristo Superstar - Espa=F1a - Pablo Abraira=20 La Tiendita Del Horror - Espa=F1a=20 MAME - M=E9xico Silvia Pinal - Cristian Castro=20 Sor-Presas - Buenos Aires - Beatriz Bonet, Ana Mar=EDa Cores, Sandra Guida= =20 y todo lo que NI TE IMAGIN=C1S Pedinos el listado completo de nuestros videos y Cds de comedias musicales= a lesluthiers-pinti@aris=2Ecom=2Ear del M=E1s Grande Surtido de T=EDtulos= de Comedias Musicales de Argentina, M=E9xico, Espa=F1a, Broadway, Londres= y el resto del mundo, material de colecci=F3n que nunca se edit=F3=2E Tod= os los videos y Cds de Comedias Musicales que siempre so=F1aste tener=2E y todo lo que NI TE IMAGIN=C1S El formato de los videos es en VHS y son todas funciones completas grabada= s en vivo=2E En su mayor=EDa son videos que en su momento se hicieron para= sus respectivos elencos y jam=E1s se editaron con fines comerciales=2E =20= Si necesitas m=E1s informaci=F3n mandanos un tel=E9fono y te llamamos=2E=20= para no recibir mas nuestros mensajes escribinos en el asunto un mail a le= sluthiers-pinti@aris=2Ecom=2Ear poniendo en el asunto: "DAR DE BAJA"=20 =09 |
From: Jim C. <jc...@di...> - 2003-07-09 17:00:50
|
Mike Schilli wrote: >On Tue, 8 Jul 2003, Vince Veggus wrote: > > > >>I want my module a.pm to log into a.log, b.pm into b.log. >>I call init(a.conf) and getLogger() in the Constructor of a. >>I call init(b.conf) and getLogger() in the Constructor of b. >>My run.pl uses a and b, a->run() an b->run() log something into >>a.log and b.log. >> >> >> Youve implied that you want b.pm writing to b.log, irrespective of whether its being used by X.pl or Y.pl. This may be unwise; your logs could be incomprehensible if X and Y (or even X and X) are run simultaneously. You may find them more useful if; theyre keyed to the executable name, theyre datestamped, one log-file per run. (assuming 2 progs in under second is unlikely) the following does this - it extracts the logfile name from $0, so the same config can be used from all your tools. log4perl.appender.MainLog.filename = sub { \ my $n = $0; \ $n =~ s|.*/||; \ $n =~ s/(\.(t|pl))?$//; \ $d = strftime "$format", scalar localtime; return "./$n.$d.log";\ } You can play similar tricks in choosing which log-config file to load, based upon value of $0, or of cmdline option. >But after calling a->run() b->run() logs into a.log too. > > you might just raise level of the root logger, so it doesnt print anything, then have a-logger and b-logger be siblings, rather than one also being root logger. |
From: Vince V. <vi...@ly...> - 2003-07-09 08:40:05
|
Hello Mike Thank's for your quick reply, this works. But I'd like my modules to log into different files absoluteley indepently 'cause I'll have a lot of them working with each other without having a "master" script that controlles them. There will be more than one script that starts stuff and uses them. Therefore every module shall be in charge of it's own logging... Is this against the fundamental idea of log4perl or is there a way to accomplish this? Best regards, Vince mailto:vi...@ly... ----- Tuesday, July 8, 2003, 7:37:05 PM, you wrote: >> I want my module a.pm to log into a.log, b.pm into b.log. >> I call init(a.conf) and getLogger() in the Constructor of a. >> I call init(b.conf) and getLogger() in the Constructor of b. >> My run.pl uses a and b, a->run() an b->run() log something into >> a.log and b.log. >> But after calling a->run() b->run() logs into a.log too. MS> init() can be called only once -- preferrably in the main program. Modules MS> you're using should define their logging statements, but should *not* MS> call init(). MS> You might want to write it like this: MS> package A; MS> use Log::Log4perl qw(get_logger); MS> sub run { get_logger("A")->debug("I'm A!"); } MS> package B; MS> use Log::Log4perl qw(get_logger); MS> sub run { get_logger("B")->debug("I'm B!"); } MS> package main; MS> use Log::Log4perl; Log::Log4perl->>init(\ <<'EOT'); MS> log4perl.category.A = DEBUG, LogfileA MS> log4perl.appender.LogfileA = Log::Log4perl::Appender::File MS> log4perl.appender.LogfileA.filename = a.log MS> log4perl.appender.LogfileA.layout = SimpleLayout MS> log4perl.category.B = DEBUG, LogfileB MS> log4perl.appender.LogfileB = Log::Log4perl::Appender::File MS> log4perl.appender.LogfileB.filename = b.log MS> log4perl.appender.LogfileB.layout = SimpleLayout MS> EOT MS> A::run(); MS> B::run(); MS> __END__ MS> -- Mike MS> Mike Schilli MS> log...@pe... MS> http://perlmeister.com MS> http://log4perl.sourceforge.net MS> ------------------------------------------------------- MS> This SF.Net email sponsored by: Parasoft MS> Error proof Web apps, automate testing & more. MS> Download & eval WebKing and get a free book. MS> www.parasoft.com/bulletproofapps MS> _______________________________________________ MS> log4perl-devel mailing list MS> log...@li... MS> https://lists.sourceforge.net/lists/listinfo/log4perl-devel |
From: Mike S. <log...@pe...> - 2003-07-08 17:38:08
|
On Tue, 8 Jul 2003, Vince Veggus wrote: > I want my module a.pm to log into a.log, b.pm into b.log. > I call init(a.conf) and getLogger() in the Constructor of a. > I call init(b.conf) and getLogger() in the Constructor of b. > My run.pl uses a and b, a->run() an b->run() log something into > a.log and b.log. > But after calling a->run() b->run() logs into a.log too. init() can be called only once -- preferrably in the main program. Modules you're using should define their logging statements, but should *not* call init(). You might want to write it like this: package A; use Log::Log4perl qw(get_logger); sub run { get_logger("A")->debug("I'm A!"); } package B; use Log::Log4perl qw(get_logger); sub run { get_logger("B")->debug("I'm B!"); } package main; use Log::Log4perl; Log::Log4perl->init(\ <<'EOT'); log4perl.category.A = DEBUG, LogfileA log4perl.appender.LogfileA = Log::Log4perl::Appender::File log4perl.appender.LogfileA.filename = a.log log4perl.appender.LogfileA.layout = SimpleLayout log4perl.category.B = DEBUG, LogfileB log4perl.appender.LogfileB = Log::Log4perl::Appender::File log4perl.appender.LogfileB.filename = b.log log4perl.appender.LogfileB.layout = SimpleLayout EOT A::run(); B::run(); __END__ -- Mike Mike Schilli log...@pe... http://perlmeister.com http://log4perl.sourceforge.net |
From: Mike S. <log...@pe...> - 2003-07-08 17:05:33
|
On Tue, 8 Jul 2003, James.FitzGibbon wrote: > So $0 would not be available unless explicitly shared. If this is > a problem, $0 could always be added to > %VARS_SHARED_WITH_SAFE_COMPARTMENT in Log/Log4perl.pm Well, I think it's a problem with 041SafeEval.t, because your test case runs a stat($0) which always fails because $0 isn't shared explicitely -- right? I just noticed it yesterday because the test suite spit out some warnings. Here's a patch: Index: 041SafeEval.t =================================================================== RCS file: /cvsroot/log4perl/Log-Log4perl/t/041SafeEval.t,v retrieving revision 1.3 diff -a -u -r1.3 041SafeEval.t --- 041SafeEval.t 31 May 2003 18:20:34 -0000 1.3 +++ 041SafeEval.t 8 Jul 2003 17:04:26 -0000 @@ -14,6 +14,10 @@ my $example_log = "example" . (stat($0))[9] . ".log"; unlink($example_log); +Log::Log4perl::Config->vars_shared_with_safe_compartment( + main => [ '$0' ], +); + # test that unrestricted code works properly Log::Log4perl::Config::allow_code(1); my $config = <<'END'; -- Mike Mike Schilli log...@pe... http://perlmeister.com http://log4perl.sourceforge.net |
From: James.FitzGibbon <Jam...@ta...> - 2003-07-08 14:57:24
|
This is from the Safe docs: By default, the only variables shared with compartments are the = "underscore" variables $_ and @_ (and, technically, the less frequently = used %_, the _ filehandle and so on). This is because otherwise perl = operators which default to $_ will not work and neither will the = assignment of arguments to @_ on subroutine entry.=20 So $0 would not be available unless explicitly shared. If this is a problem, $0 could always be added to %VARS_SHARED_WITH_SAFE_COMPARTMENT in Log/Log4perl.pm Regards. -- j. James FitzGibbon =20 Consultant, Ajilon Services, TTS-3D@CC-950=20 jam...@ta... voice/fax 612-304-6121/3277 > -----Original Message----- > From: Mike Schilli [mailto:log...@pe...] > Sent: Monday, July 07, 2003 6:45 PM > To: Log4perl Devel Mailing List; James.FitzGibbon > Cc: Tim...@ig... > Subject: $0 not defined in Safe.pm? >=20 >=20 > Hi all, >=20 > just saw that there's a warning message coming out of=20 > Log4perl's test case > t/041SafeEval.t and it boils down to that $0 is not available in Safe > compartments, this snippet >=20 > use Safe; > my $safe =3D Safe->new(); > $safe->reval('print "\$0 is $0\n"'); >=20 > won't show anything for $0. This results in stat() being called with a > undef argument in >=20 > log4perl.appender.Main.filename =3D \ > sub { "example" . (stat($0))[9] . ".log" } >=20 > if Log4perl's Safe compartments are used. Does anyone know if=20 > this is a bug > in Safe? >=20 > -- Mike >=20 > Mike Schilli > log...@pe... > http://perlmeister.com > http://log4perl.sourceforge.net >=20 |
From: Vince V. <vi...@ly...> - 2003-07-08 13:22:27
|
Hello, I want my module a.pm to log into a.log, b.pm into b.log. I call init(a.conf) and getLogger() in the Constructor of a. I call init(b.conf) and getLogger() in the Constructor of b. My run.pl uses a and b, a->run() an b->run() log something into a.log and b.log. But after calling a->run() b->run() logs into a.log too. Why? Where's my mistake? The modules are available at http://www.nomorepasting.com/paste.php?pasteID=5969 any hint is welcom, best regards, Vince |
From: Vince V. <vi...@ly...> - 2003-07-08 11:05:20
|
Hello, I want my module a.pm to log into a.log, b.pm into b.log. I call init(a.conf) and getLogger() in the Constructor of a. I call init(b.conf) and getLogger() in the Constructor of b. My run.pl uses a and b, a->run() an b->run() log something into a.log and b.log. But after calling a->run() b->run() logs into a.log too. Why? Where's my mistake? The modules are available at http://www.nomorepasting.com/paste.php?pasteID=5969 -- Best regards, Vince mailto:vi...@ly... |
From: Mike S. <log...@pe...> - 2003-07-07 23:44:56
|
Hi all, just saw that there's a warning message coming out of Log4perl's test case t/041SafeEval.t and it boils down to that $0 is not available in Safe compartments, this snippet use Safe; my $safe = Safe->new(); $safe->reval('print "\$0 is $0\n"'); won't show anything for $0. This results in stat() being called with a undef argument in log4perl.appender.Main.filename = \ sub { "example" . (stat($0))[9] . ".log" } if Log4perl's Safe compartments are used. Does anyone know if this is a bug in Safe? -- Mike Mike Schilli log...@pe... http://perlmeister.com http://log4perl.sourceforge.net |