From: Tony B. <log...@tm...> - 2004-01-06 10:59:25
|
I'm getting a strange test failure in our framework on one machine and not on another: Can't call method "PRINT" on an undefined value at /usr/share/perl5/Log/Log4perl/Appender/Screen.pm line 27. Both machines have the latest log4perl, and major difference is that the machine that's fine is perl 5.8.1 and the one that's not is perl 5.8.2. However I have no idea whether that's relevant or not, or whether something else is going on. At this point I can't get a simple failing test case: the error messages don't even point me sensibly to where the problem is, and putting some debug messages make the error report itself as happening somewhere completely differently. Before I go mad digging into this, has anyone seen this, or have any ideas what it could be? Thanks, Tony |
From: Tony B. <log...@tm...> - 2004-01-06 11:16:42
|
On Tue, Jan 06, 2004 at 10:59:13AM +0000, Tony Bowden wrote: > I'm getting a strange test failure in our framework on one machine and > not on another: > Can't call method "PRINT" on an undefined value at > /usr/share/perl5/Log/Log4perl/Appender/Screen.pm line 27. Hmmm. I doubt this has anything to do with Log4perl. I can reduce it now to: use IO::Scalar; local *STDERR = new IO::Scalar \my $data; print STDERR "Wibble wibble wibble\n"; print "Data = $data\n"; This seems to work on 5.8.1 and fail on 5.8.2. While I try to discover why that is, perhaps someone could tell me a better way to actually write this sort of test. Basically I need to test my application is issuing debugging messages correctly to STDERR. Previously I was just grabbing STDERR to a scalar and then testing that normally, but now that that's not working I should probably find a better way! My guess would be that in my test I would tell log4perl to use a different method of logging that's easier to test. It's not quite the same, but it's probably good enough. Is this a sensible approach, or is there a better way? If it's sensible, where's the best place to hook in to do that? Thanks, Tony |
From: Kevin G. <ke...@go...> - 2004-01-06 16:37:01
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Tony Bowden wrote: | On Tue, Jan 06, 2004 at 10:59:13AM +0000, Tony Bowden wrote: | While I try to discover why that is, perhaps someone could tell | me a better way to actually write this sort of test. Basically I | need to test my application is issuing debugging messages correctly | to STDERR. For testing log4perl itself, we use the TestBuffer appender, grep the tests under t/*.t for 'TestBuffer' for examples. You can log to a TestBuffer and then look at it to see what got logged. - -- Happy Trails . . . Kevin M. Goess (and Anne and Frank) 904 Carmel Ave. Albany, CA 94706 (510) 525-5217 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org iD8DBQE/+uQk4g4/Tl71vUkRAtxAAKCpAJrL0mq3f4VzgbcD5jPhYpaqrACgv10k xz0nQ9zgJe9EwUtA7e7YNME= =Hubm -----END PGP SIGNATURE----- |
From: Mike S. <msc...@ao...> - 2004-01-06 17:12:39
|
Tony Bowden wrote on 1/6/2004, 3:16 AM: > My guess would be that in my test I would tell log4perl to use a > different > method of logging that's easier to test. It's not quite the same, but > it's probably good enough. > > Is this a sensible approach, or is there a better way? If it's sensible, > where's the best place to hook in to do that? Absolutely, that's the way to go -- changing where logged message of a system are going is just a matter of configuring l4p. Just use a Log::Log4perl::Appender::File appender or Log::Log4perl::Appender::TestBuffer at initialization time. Something like: use Log::Log4perl qw(:easy); my $conf = q( log4perl.category = DEBUG, Logfile log4perl.appender.Logfile = Log::Log4perl::Appender::File log4perl.appender.Logfile.filename = test.log log4perl.appender.Logfile.layout = \ Log::Log4perl::Layout::PatternLayout log4perl.appender.Logfile.layout.ConversionPattern = %d %F{1} %L> %m %n ); Log::Log4perl::init(\$conf); DEBUG "wibble"; -- -- Mike Mike Schilli m...@pe... |
From: Tony B. <log...@tm...> - 2004-01-09 13:37:22
|
On Tue, Jan 06, 2004 at 09:12:17AM -0800, Mike Schilli wrote: > Absolutely, that's the way to go -- changing where logged message of a > system are going is just a matter of configuring l4p. > Just use a Log::Log4perl::Appender::File appender or > Log::Log4perl::Appender::TestBuffer at initialization time. I think I'm missing something quite fundamental here because I can't get this to work. With some fiddling around it seems that the problem is that my Log4perl::init() in the test gets clobbered by the one in the code that I'm testing and so doesn't actually log to the TestBuffer at all. Take the below example, which doesn't work. If I create a $foo before calling the Log4perl::init, everything works fine. But in the app I'm testing, there's no sensible place to hook in like this that I can find. Suggestions? Thanks, Tony ------ BEGIN EXAMPLE ------- package My::Foo; use Log::Log4perl ':easy'; sub new { Log::Log4perl->easy_init($INFO); bless {} => shift } sub do_it { my ($self, $info) = @_; get_logger()->info("do_it needs args") unless $info; return; } package main; use Test::More tests => 1; Log::Log4perl::init(\q{ screen = Log::Log4perl::Appender::TestBuffer log4perl.category = INFO, BufferApp log4perl.appender.BufferApp = ${screen} log4perl.appender.BufferApp.layout = \ Log::Log4perl::Layout::PatternLayout log4perl.appender.BufferApp.layout.ConversionPattern = %d %F{1} %L> %m %n }); { my $log = Log::Log4perl::Appender::TestBuffer->by_name("BufferApp"); My::Foo->new->do_it(1); is $log->buffer, "", "No log if args"; } { my $log = Log::Log4perl::Appender::TestBuffer->by_name("BufferApp"); My::Foo->new->do_it(); like $log->buffer, qr/needs args/, "Logged if no args"; } ------ END EXAMPLE ------- |
From: Kevin G. <ke...@go...> - 2004-01-09 16:27:33
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Tony Bowden wrote: | With some fiddling around it seems that the problem is that my | Log4perl::init() in the test gets clobbered by the one in the code that | I'm testing and so doesn't actually log to the TestBuffer at all. No doubt. When you initialize Log4perl it's initialized for the entire perl interpreter. With that in mind you don't need to call init() inside your new() method, just put it in the body of the module so that it loads once. Then make sure the test's init() method gets called after the module's init method, like it does in your code sample. See the patch below. Mike, please correct me if my understanding of easy_init() is wrong. - --- test.old.pl Fri Jan 9 08:23:35 2004 +++ test.pl Fri Jan 9 08:18:24 2004 @@ -2,9 +2,10 @@ ~ use Log::Log4perl ':easy'; +Log::Log4perl->easy_init($INFO); ~ sub new { - -Log::Log4perl->easy_init($INFO); + ~ bless {} => shift ~ } - -- Happy Trails . . . Kevin M. Goess -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org iD8DBQE//tZY4g4/Tl71vUkRAqfpAKDOZ001BOHxXTYrzJAgOV2LFaoO+gCfVpHH DEe4yOSCk2NLEWcafv5lxPw= =Ockr -----END PGP SIGNATURE----- |
From: Tony B. <log...@tm...> - 2004-01-09 17:17:06
|
On Fri, Jan 09, 2004 at 08:27:05AM -0800, Kevin Goess wrote: > No doubt. When you initialize Log4perl it's initialized for the entire > perl interpreter. With that in mind you don't need to call init() > inside your new() method, just put it in the body of the module so that > it loads once. Then make sure the test's init() method gets called > after the module's init method, like it does in your code sample. See > the patch below. I think I'm missing something fairly fundamental then. I'm using this in a web environment. By default only things of level ERROR get logged. However, requests can supply a parameter, which will switch logging to, for example, INFO level. Thus, in the application, the init() is called per request, based on the CGI paramaters received. So, in my test I really need to make the exact same request twice, except the second time I want to also set that parameter. I then need to check that there were no messages the first time, and certain ones the second time. How can do this? I suspect there's a philosophical problem approach that I'm not quite grokking yet, rather than a technical problem. Tony |
From: Tony B. <log...@tm...> - 2004-01-09 17:23:51
|
On Fri, Jan 09, 2004 at 05:17:02PM +0000, Tony Bowden wrote: > I'm using this in a web environment. By default only things of level > ERROR get logged. However, requests can supply a parameter, which > will switch logging to, for example, INFO level. To clarify, a closer example to what I'm really doing: ------- package My::Foo; use Log::Log4perl ':easy'; sub new { my $class = shift; my $args = shift || {}; Log::Log4perl->easy_init($args->{DEBUG} ? $DEBUG : $ERROR); bless {} => $class; } sub do_it { get_logger()->info("do_it called") } package main; use Test::More tests => 1; Log::Log4perl::init(\q{ screen = Log::Log4perl::Appender::TestBuffer log4perl.category = INFO, BufferApp log4perl.appender.BufferApp = ${screen} log4perl.appender.BufferApp.layout = \ Log::Log4perl::Layout::PatternLayout log4perl.appender.BufferApp.layout.ConversionPattern = %d %F{1} %L> %m %n }); { my $log = Log::Log4perl::Appender::TestBuffer->by_name("BufferApp"); My::Foo->new()->do_it; is $log->buffer, "", "do_it not logged normally"; } { my $log = Log::Log4perl::Appender::TestBuffer->by_name("BufferApp"); My::Foo->new({ DEBUG => 1 })->do_it; like $log->buffer, qr/do_it/, "do_it logged in debug mode"; } ---------- Tony |
From: Mike S. <msc...@ao...> - 2004-01-09 18:14:53
|
Tony Bowden wrote on 1/9/2004, 9:17 AM: > Thus, in the application, the init() is called per request, based on the > CGI paramaters received. init() (or easy_init()) should be called exactly once, when the application starts up. If you're running a typical CGI-Skript, running it per request is fine. However, in a persistent environment (like mod_perl), calling init() (or easy_init()) per request is not recommended -- what will happen is that the L4p settings for the entire system will be clobbered and set to the new configuration. If you have test appenders defined and then you're running easy_init(), L4p will clobber them and go for the settings defined in easy_init() -- typically by writing messages to STDOUT. In your init() call, you specified just one logger: log4perl.category = INFO, BufferApp That's the root logger. If you want to reset its level in the new() call, just do something like my $logger = Log::Log4perl::get_logger(""); $logger->level($ERROR); BTW, :easy mode automatically defines loggers (so-called stealth loggers) named after the current package. So, to get a logger defined by :easy in the "main" package, do this: use Log::Log4perl qw(:easy); Log::Log4perl->easy_init($DEBUG); DEBUG("gets logged"); ERROR("gets logged"); my $logger = get_logger("main"); $logger->level($ERROR); DEBUG("doesn't get logged"); ERROR("gets logged"); -- -- Mike Mike Schilli m...@pe... |
From: Tony B. <log...@tm...> - 2004-01-10 01:17:52
|
On Fri, Jan 09, 2004 at 10:14:33AM -0800, Mike Schilli wrote: > init() (or easy_init()) should be called exactly once, when the > application starts up. If you're running a typical CGI-Skript, running > it per request is fine. However, in a persistent environment (like > mod_perl), calling init() (or easy_init()) per request is not > recommended ... If you want to reset its level in the new() > call, just do something like ... $logger->level($ERROR); Aha. That makes sense. I think this should be made much clearer in the docs. It's quite an important philosophical point about how the package is used that probably differs quite significantly from how many people's home-grown approaches would have worked. Switching my method in new() from Log::Log4perl->easy_init($args->{DEBUG} ? $DEBUG : $ERROR); to get_logger->level($args->{DEBUG} ? $DEBUG : $ERROR); seems to do the trick in my simple test. I'll try plugging this approach into the real application tomorrow. Thanks, Tony |
From: Tony B. <log...@tm...> - 2004-01-11 22:31:15
|
On Sat, Jan 10, 2004 at 01:17:49AM +0000, Tony Bowden wrote: > Switching my method in new() from > Log::Log4perl->easy_init($args->{DEBUG} ? $DEBUG : $ERROR); > to > get_logger->level($args->{DEBUG} ? $DEBUG : $ERROR); > seems to do the trick in my simple test. I'll try plugging this approach > into the real application tomorrow. Works like a charm. Thanks all, Tony |
From: William M. <wi...@kn...> - 2004-01-13 02:46:02
|
Hi all, The recent discussions about not repeatedly calling the init (or easy_init) functions when running in modperl environments bring up an issue that I had not considered. I use CGI::Application for web development. It has cgi instance scripts that invoke modules to allow for modular web applications. These scripts are handled with Apache::Registry for performance improvement. I do not believe there is any way to have the init function only called once within this framework. So far, I have not noticed any problems with repeatedly calling init on each cgi access. Are there any other CGI::App users here who can shed some light on this issue? Thanks, William -- Knowmad Services Inc. http://www.knowmad.com |
From: Kevin G. <ke...@go...> - 2004-01-13 06:07:02
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 | are handled with Apache::Registry for performance improvement. I do not | believe there is any way to have the init function only called once | within this framework. Is this a possibility for you? From 'perldoc mod_perl' ~ PerlRequire perl-scripts/script_to_load_at_startup.pl ~ A PerlRequire file is commonly used for intialization dur ~ ing server startup time. A PerlRequire file name can be ~ absolute or relative to ServerRoot or a path in @INC. A ~ PerlRequire'd file must return a true value, i.e., the end ~ of this file should have a: ~ 1; #return true value ~ See eg/startup.pl for an example to start with. | So far, I have not noticed any problems with | repeatedly calling init on each cgi access. For myself, I won't say that doing it that way will definitely cause problems, but I won't endorse it, either. I'm going to play it conservative and just say, "Your mileage may vary." Calling init() with the same config information isn't the best, performance-wise, and it's kind of outside the bounds of our design/conception. Unless Mike has something better to say about it, that is... - -- Happy Trails. . . Kevin M. Goess (and Anne and Frank) 904 Carmel Ave. Albany, CA 94706 (510)525-5217 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org iD8DBQFAA4qL4g4/Tl71vUkRAnXBAKClBW3VI1c1yWA7O2hF+CI5p/leGQCfXMev N4Iwt83BXisoqwralJyaPCY= =6tio -----END PGP SIGNATURE----- |
From: Mike S. <msc...@ao...> - 2004-01-13 08:53:56
|
Kevin Goess wrote on 1/12/2004, 10:05 PM: > Calling init() with > the same config information isn't the best, performance-wise, and it's > kind of outside the bounds of our design/conception. Unless Mike has > something better to say about it, that is... I agree, using the startup handler to call init exactly once is definitely the way to go for now. Hmm ... just had an idea: How about if Log::Log4perl featured an init_once() method, like Apache::DBI, which connects (inits) only if it doesn't have a valid connection (configuration) yet? Or maybe we do Apache::Log::Log4perl :) ? -- -- Mike Mike Schilli m...@pe... |
From: Mike S. <msc...@ao...> - 2004-01-13 09:16:35
|
Mike Schilli wrote on 1/13/2004, 12:53 AM: > Hmm ... just had an idea: Oh, and for now, something like use Log::Log4perl; unless($Log::Log4perl::Logger::INITIALIZED) { Log::Log4perl->init(...); } might do the trick (at least if it's single-threaded) ... -- -- Mike Mike Schilli m...@pe... |
From: William M. <wi...@kn...> - 2004-01-13 13:59:03
|
On Tue, Jan 13, 2004 at 01:16:16AM -0800, Mike Schilli wrote: > Oh, and for now, something like > > use Log::Log4perl; > > unless($Log::Log4perl::Logger::INITIALIZED) { > Log::Log4perl->init(...); > } > > might do the trick (at least if it's single-threaded) ... OK, I'll add that to my code just to be on the safe side. I am single-threaded but am running multiple processes (typical Apache server under Linux stuff). I guess each process will have it's own Log4perl object, but what if I run multiple applications that use Log4perl? It looks like you are calling a class attribute. At startup, it seems like one app could initialize the object and the next would not initialize it's logger object and run into problems. But perhaps I'm not grokking how you have the Log4perl system setup. BTW, why won't this code work in a multi-threaded environment? Is it because Log4perl is not ready for it or something more insidious? It seems that some distros are starting to ship Perl with threading enabled. I'm not sure I'm ready for this brave new world..... Thanks, William -- Knowmad Services Inc. http://www.knowmad.com |
From: Kevin G. <ke...@go...> - 2004-01-13 16:27:28
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 William McKee wrote: | but what if I run multiple applications that use | Log4perl? It looks like you are calling a class attribute. At startup, | it seems like one app could initialize the object and the next would not | initialize its logger object and run into problems. Yup, that's why you have to think in terms of one big log4perl engine per interpreter. It follows from that that you'd have one big config file for your whole site, not separate configs for each application. With the flexibility of categories, it should be simple to keep the applications' logging behavior separate. | BTW, why won't this code work in a multi-threaded environment? Mike,can you answer that one? - -- Happy Trails . . . Kevin M. Goess (and Anne and Frank) 904 Carmel Ave. Albany, CA 94706 (510) 525-5217 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org iD8DBQFABBxi4g4/Tl71vUkRAkiHAJ9DmQUsU/JrflAza2afflll6xhJbQCgmWcP byP4U/nDClEXNdhuLtQuAbQ= =Afuc -----END PGP SIGNATURE----- |
From: William M. <wi...@kn...> - 2004-01-13 18:17:26
|
On Tue, Jan 13, 2004 at 08:27:14AM -0800, Kevin Goess wrote: > Yup, that's why you have to think in terms of one big log4perl engine > per interpreter. It follows from that that you'd have one big config > file for your whole site, not separate configs for each application. > With the flexibility of categories, it should be simple to keep the > applications' logging behavior separate. Oh, I hadn't come to this realization yet probably because I haven't tried using Log4perl across multiple applications running on the same server. This is probably also why I haven't noticed any anomalies in calling init multiple times. Glad to know about it now before I got further down the road of deploying modperl apps with Log4perl! It sounds like I need to have the init called from the startup script via a PerlRequire directive as you had suggested. I'll have to either create a system-wide config file or write some code to pull the configs in from my various projects. Thanks for the info! William -- Knowmad Services Inc. http://www.knowmad.com |
From: Mike S. <msc...@ao...> - 2004-01-14 02:23:47
|
Kevin Goess wrote on 1/13/2004, 8:27 AM: > | BTW, why won't this code work in a multi-threaded environment? Looks like I was overzealous on this one ... generally speaking, having unsynchronized globals in multi-threaded code introduces race conditions. However, perl's 5.6+ threading model doesn't share variables between threads by default, so that's not an issue. And in the special case of the code I posted, it would probably even be ok if variables were shared, because worst case you would initialize L4p twice, which isn't the end of the world. One thing I wanted to add for mod_perl-like multi-process environments, though: No matter if you use a startup handler to init() L4p or use the init_once() strategy (just added it to 0.42), you're very likely to have unsynchronized writes to logfiles. If L4p is configured with a log file appender, and it is initialized via the Apache startup handler, the file handle created initially will be shared among all Apache processes. Similarly, with the init_once() approach: although every process has a separate L4p configuration, processes are gonna share the appender file *names* instead, effectively opening several different file handles on the same file. Now, having several appenders using the same file handle or having several appenders logging to the same file unsynchronized, this might result in overlapping messages. Sometimes, this is acceptable. If it's not, here's two strategies: * Use Log4perl's Synchronized appender to connect to your file appenders. Here's the writeup: http://log4perl.sourceforge.net/releases/Log-Log4perl/docs/html/Log/Log4perl/FAQ.html#23804 * Use a different logfile for every process like in #log4perl.conf ... log4perl.appender.A1.filename = sub { "mylog.$$.log" } Hope that helps ... -- -- Mike Mike Schilli m...@pe... |
From: Kevin G. <ke...@go...> - 2004-01-14 06:21:10
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 | not, here's two strategies: | | * Use Log4perl's Synchronized appender to connect to your file | | * Use a different logfile for every process like in or use the DBIAppender, and let the database take care of concurrency... - -- Happy Trails. . . Kevin M. Goess (and Anne and Frank) 904 Carmel Ave. Albany, CA 94706 (510)525-5217 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org iD8DBQFABN+N4g4/Tl71vUkRAkRrAJ4sVkg1Y7/+El8HxH6XZsTUScwgQwCfZaiA EFXDzs92DJ0kXocDAzpV+qc= =WvU2 -----END PGP SIGNATURE----- |
From: William M. <wi...@kn...> - 2004-01-13 13:52:06
|
On Tue, Jan 13, 2004 at 12:53:38AM -0800, Mike Schilli wrote: > I agree, using the startup handler to call init exactly once is > definitely the way to go for now. Hmm ... just had an idea: How about if > Log::Log4perl featured an init_once() method, like Apache::DBI, which > connects (inits) only if it doesn't have a valid connection > (configuration) yet? Or maybe we do Apache::Log::Log4perl :) ? If you want to take on the task of creating a caching mechanism inside of log4perl, I'd certainly take advantage of it. I wonder though if that's the right place for it. Does log4j do this kind of caching? Will anyone else need this support (I'm guessing so since you seemed to have been considering it)? I like the idea of a caching module like Apache::DBI that transparently provides caching for log4perl objects. I'd be glad to do any testing for you. William -- Knowmad Services Inc. http://www.knowmad.com |
From: Kevin G. <ke...@go...> - 2004-01-13 16:20:05
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mike Schilli wrote: | definitely the way to go for now. Hmm ... just had an idea: How about if | Log::Log4perl featured an init_once() method, like Apache::DBI, which | connects (inits) only if it doesn't have a valid connection | (configuration) yet? Brilliant! The only question I have is: why didn't we think of that before? - -- Happy Trails . . . Kevin M. Goess (and Anne and Frank) 904 Carmel Ave. Albany, CA 94706 (510) 525-5217 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org iD8DBQFABBqp4g4/Tl71vUkRAsyoAJwJBrCY7ZfEs8DNS1EVbQYRAP94awCffKvQ Htaw/FZAvtSUtcIhwEwzrq0= =HLNJ -----END PGP SIGNATURE----- |
From: William M. <wi...@kn...> - 2004-01-13 19:30:24
|
On Tue, Jan 13, 2004 at 08:19:53AM -0800, Kevin Goess wrote: > Mike Schilli wrote: > | definitely the way to go for now. Hmm ... just had an idea: How about if > | Log::Log4perl featured an init_once() method, like Apache::DBI, which > | connects (inits) only if it doesn't have a valid connection > | (configuration) yet? > > Brilliant! The only question I have is: why didn't we think of that before? Perhaps because it is only needed by cgi scripts running under Apache::Registry. It seems like modules written for modperl could run the init just once. How about another feature? Would there be a way to have this module append configuration info when init is called by two separate applications? That would allow Log4perl configurations to be kept with their respective applications and yet run under the same logger. Or is modifying the configuration of a running logger not suggested? Thanks, William -- Knowmad Services Inc. http://www.knowmad.com |
From: Mike S. <msc...@ao...> - 2004-01-14 02:36:06
|
William McKee wrote on 1/13/2004, 11:30 AM: > How about another feature? Would there be a way to have this module > append configuration info when init is called by two separate > applications? I seem to remember that this has been suggested here before :). We've been playing with this idea, but kind of stepped away from it because it's too easy for different applications to step on each others feet (by accidently using the same appender names etc.) without any effective means to prevent that yet. And some day, we're gonna tackle this "Logger Repository" issue, I promise :). -- -- Mike Mike Schilli m...@pe... |
From: William M. <wi...@kn...> - 2004-01-14 03:49:50
|
On Tue, Jan 13, 2004 at 06:35:47PM -0800, Mike Schilli wrote: > I seem to remember that this has been suggested here before :). We've > been playing with this idea, but kind of stepped away from it because > it's too easy for different applications to step on each others feet (by > accidently using the same appender names etc.) without any effective > means to prevent that yet. Yeah, I seem to recall that thread now that you mention it. I didn't understand the reason for the discussion at the time but it sure makes sense now! Ain't perspective grand?! > And some day, we're gonna tackle this "Logger Repository" issue, I > promise :). How's the Logger Repository issue different from the init_once function which you have already incanted into 0.42? Seems like they are addressing the same issue of having calling init multiple times. I guess the Logger Repository is a bit broader, but I don't have all the background. Thanks, William -- Knowmad Services Inc. http://www.knowmad.com |