From: Maxim M. <mal...@ya...> - 2003-06-19 13:15:33
|
Hi everyone: I'm using Log4perl (v 0.34) quite extensively in my modules and it works just great on my Win2K machine with Perl 5.6.0 and 5.8.0. I installed it using PPD from this site. I have recently installed my script on the IIS 5.0 with PerlEx.dll for the Active State Perl 5.6.0 build 633 and have intermittent problems with Log4perl being unable to precompile whenever I change the script. I'm using Log::Dispatch::File as my Appender and the error seems to be related to it: Precompiler: Eval Error: Package:[PerlEx::Precompiler::c_::wwwroot::archive::cgi_2dbin::survey_asp] File:[C:\wwwroot\archive\cgi-bin\survey.asp] Error:[Can't call method "log" on an undefined value at c:/Perl/site/lib/Log/Log4perl/Appender.pm line 177. ] Precompiler: Returning -1 at 594 My config file works fine with the regular Perl: ======================================================= log4perl.logger = INFO, Logfile # appender log4perl.appender.Logfile = Log::Dispatch::File log4perl.appender.Logfile.filename = logs/bdb.log log4perl.appender.Logfile.layout = Log::Log4perl::Layout::PatternLayout log4perl.appender.Logfile.layout.ConversionPattern = %d %X{IP} %p %F{1}:%L (%M) => %m%n ======================================================= The module where Log4perl is called is inside the BEGIN block and it looks like like the Appender's new method fails to create an object correctly. If I restart IIS, the error goes away but I feel uncomfortable to use the script in production without knowing what's causing the problem. Are there any patches I need to apply to use Log4perl with PerlEx? Any help is greatly appreciated. Thanks, ===== Maxim Maltchevski __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com |
From: Mike S. <log...@pe...> - 2003-06-19 23:43:32
|
On Thu, 19 Jun 2003, Maxim Maltchevski wrote: > Hi everyone: > I'm using Log4perl (v 0.34) quite extensively in my > modules and it works just great on my Win2K machine > with Perl 5.6.0 and 5.8.0. I installed it using PPD > from this site. I have recently installed my script on > the IIS 5.0 with PerlEx.dll for the Active State Perl > 5.6.0 build 633 and have intermittent problems with > Log4perl being unable to precompile whenever I change > the script. I'm using Log::Dispatch::File as my > Appender and the error seems to be related to it: I'm not using PerlEx, so I can't help you there, but one thing I wanted to check: There's been a recent change to Log::Log4perl in that it ships with its own appenders (Log::Log4perl::Appender::File etc.) and not with Log::Dispatch by default. Could it be that you haven't installed Log::Dispatch but are using it in the conf file and that PerlEx throws a cryptic error messages because of that? -- Mike Mike Schilli log...@pe... http://perlmeister.com http://log4perl.sourceforge.net > > Precompiler: Eval Error: > > Package:[PerlEx::Precompiler::c_::wwwroot::archive::cgi_2dbin::survey_asp] > File:[C:\wwwroot\archive\cgi-bin\survey.asp] > Error:[Can't call method "log" on an undefined value > at c:/Perl/site/lib/Log/Log4perl/Appender.pm line 177. > ] > Precompiler: Returning -1 at > 594 > > My config file works fine with the regular Perl: > ======================================================= > log4perl.logger = INFO, Logfile > > # appender > log4perl.appender.Logfile = Log::Dispatch::File > log4perl.appender.Logfile.filename = logs/bdb.log > log4perl.appender.Logfile.layout = > Log::Log4perl::Layout::PatternLayout > log4perl.appender.Logfile.layout.ConversionPattern = > %d %X{IP} %p %F{1}:%L (%M) => %m%n > ======================================================= > The module where Log4perl is called is inside the > BEGIN block and it looks like like the Appender's new > method fails to create an object correctly. If I > restart IIS, the error goes away but I feel > uncomfortable to use the script in production without > knowing what's causing the problem. Are there any > patches I need to apply to use Log4perl with PerlEx? > > Any help is greatly appreciated. > Thanks, > > > ===== > Maxim Maltchevski > > > > __________________________________ > Do you Yahoo!? > SBC Yahoo! DSL - Now only $29.95 per month! > http://sbc.yahoo.com > > > ------------------------------------------------------- > This SF.Net email is sponsored by: INetU > Attention Web Developers & Consultants: Become An INetU Hosting Partner. > Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! > INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > |
From: Maxim M. <mal...@ya...> - 2003-06-20 01:44:03
|
Hi Mike: Log::Dispatch is installed and I tried switching to using Log::Log4perl::Appender::File. I got the same error on the same line. It looks like PerlEx doesn't pull in appenders properly. Thanks, Maxim --- Mike Schilli <log...@pe...> wrote: > On Thu, 19 Jun 2003, Maxim Maltchevski wrote: > > > Hi everyone: > > I'm using Log4perl (v 0.34) quite extensively in > my > > modules and it works just great on my Win2K > machine > > with Perl 5.6.0 and 5.8.0. I installed it using > PPD > > from this site. I have recently installed my > script on > > the IIS 5.0 with PerlEx.dll for the Active State > Perl > > 5.6.0 build 633 and have intermittent problems > with > > Log4perl being unable to precompile whenever I > change > > the script. I'm using Log::Dispatch::File as my > > Appender and the error seems to be related to it: > > I'm not using PerlEx, so I can't help you there, but > one thing I wanted > to check: There's been a recent change to > Log::Log4perl in that it ships > with its own appenders > (Log::Log4perl::Appender::File etc.) and not with > Log::Dispatch by default. Could it be that you > haven't installed > Log::Dispatch but are using it in the conf file and > that PerlEx throws > a cryptic error messages because of that? > > -- Mike > > Mike Schilli > log...@pe... > http://perlmeister.com > http://log4perl.sourceforge.net > > > > > Precompiler: Eval Error: > > > > > Package:[PerlEx::Precompiler::c_::wwwroot::archive::cgi_2dbin::survey_asp] > > File:[C:\wwwroot\archive\cgi-bin\survey.asp] > > Error:[Can't call method "log" on an undefined > value > > at c:/Perl/site/lib/Log/Log4perl/Appender.pm line > 177. > > ] > > Precompiler: Returning -1 at > > 594 > > > > My config file works fine with the regular Perl: > > > ======================================================= > > log4perl.logger = INFO, Logfile > > > > # appender > > log4perl.appender.Logfile = Log::Dispatch::File > > log4perl.appender.Logfile.filename = logs/bdb.log > > log4perl.appender.Logfile.layout = > > Log::Log4perl::Layout::PatternLayout > > log4perl.appender.Logfile.layout.ConversionPattern > = > > %d %X{IP} %p %F{1}:%L (%M) => %m%n > > > ======================================================= > > The module where Log4perl is called is inside the > > BEGIN block and it looks like like the Appender's > new > > method fails to create an object correctly. If I > > restart IIS, the error goes away but I feel > > uncomfortable to use the script in production > without > > knowing what's causing the problem. Are there any > > patches I need to apply to use Log4perl with > PerlEx? > > > > Any help is greatly appreciated. > > Thanks, > > > > > > ===== > > Maxim Maltchevski > > > > > > > > __________________________________ > > Do you Yahoo!? > > SBC Yahoo! DSL - Now only $29.95 per month! > > http://sbc.yahoo.com > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: INetU > > Attention Web Developers & Consultants: Become An > INetU Hosting Partner. > > Refer Dedicated Servers. We Manage Them. You Get > 10% Monthly Commission! > > INetU Dedicated Managed Hosting > http://www.inetu.net/partner/index.php > > _______________________________________________ > > log4perl-devel mailing list > > log...@li... > > > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > > __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com |
From: Mike S. <log...@pe...> - 2003-06-20 08:08:09
|
On Thu, 19 Jun 2003, Maxim Maltchevski wrote: > Hi Mike: > Log::Dispatch is installed and I tried switching to > using Log::Log4perl::Appender::File. I got the same > error on the same line. It looks like PerlEx doesn't > pull in appenders properly. Interesting ... the appenders are pulled in by Log::Log4perl via eval "require Foo" at runtime -- maybe that's a problem for PerlEx? -- Mike Mike Schilli log...@pe... http://perlmeister.com http://log4perl.sourceforge.net |
From: Kevin G. <ke...@go...> - 2003-06-20 15:25:03
|
Maxim Maltchevski wrote: > Hi everyone: > the IIS 5.0 with PerlEx.dll for the Active State Perl > 5.6.0 build 633 and have intermittent problems with > Log4perl being unable to precompile whenever I change > the script. I'm using Log::Dispatch::File as my > Appender and the error seems to be related to it: > > Precompiler: Eval Error: > > Package:[PerlEx::Precompiler::c_::wwwroot::archive::cgi_2dbin::survey_asp] > File:[C:\wwwroot\archive\cgi-bin\survey.asp] > Error:[Can't call method "log" on an undefined value > at c:/Perl/site/lib/Log/Log4perl/Appender.pm line 177. > ] > Precompiler: Returning -1 at > 594 > > The module where Log4perl is called is inside the > BEGIN block and it looks like like the Appender's new > method fails to create an object correctly. If I > restart IIS, the error goes away but I feel > uncomfortable to use the script in production without > knowing what's causing the problem. Are there any > patches I need to apply to use Log4perl with PerlEx? Not having worked with PerlEx either I'm going out on a limb here, but from reading the documentation I think it has to do with the way PerlEx persists across invocations and the way Log4perl loads modules dynamically using 'eval'. If you change your script without restarting IIS maybe PerlEx reloads *part* of Log4perl's data structures as it recompiles your script. Restarting IIS gives you a clean slate. That's my guess. Do you ever see the error when you *don't* change your script? -- Happy Trails . . . Kevin M. Goess (and Anne and Frank) 904 Carmel Ave. Albany, CA 94706 (510) 525-5217 |
From: Maxim M. <mal...@ya...> - 2003-06-20 15:31:21
|
Hi Kevin: No, I don't recall it happened, if I didn't change the script. Perhaps, you are right. I'll post the question to the Active State PerlEx Mailing list. Thank you, Maxim --- Kevin Goess <ke...@go...> wrote: > Maxim Maltchevski wrote: > > Hi everyone: > > the IIS 5.0 with PerlEx.dll for the Active State > Perl > > 5.6.0 build 633 and have intermittent problems > with > > Log4perl being unable to precompile whenever I > change > > the script. I'm using Log::Dispatch::File as my > > Appender and the error seems to be related to it: > > > > Precompiler: Eval Error: > > > > > Package:[PerlEx::Precompiler::c_::wwwroot::archive::cgi_2dbin::survey_asp] > > File:[C:\wwwroot\archive\cgi-bin\survey.asp] > > Error:[Can't call method "log" on an undefined > value > > at c:/Perl/site/lib/Log/Log4perl/Appender.pm line > 177. > > ] > > Precompiler: Returning -1 at > > 594 > > > > The module where Log4perl is called is inside the > > BEGIN block and it looks like like the Appender's > new > > method fails to create an object correctly. If I > > restart IIS, the error goes away but I feel > > uncomfortable to use the script in production > without > > knowing what's causing the problem. Are there any > > patches I need to apply to use Log4perl with > PerlEx? > > Not having worked with PerlEx either I'm going out > on a limb here, but > from reading the documentation I think it has to do > with the way PerlEx > persists across invocations and the way Log4perl > loads modules > dynamically using 'eval'. If you change your script > without restarting > IIS maybe PerlEx reloads *part* of Log4perl's data > structures as it > recompiles your script. Restarting IIS gives you a > clean slate. That's > my guess. > > Do you ever see the error when you *don't* change > your script? > > -- > Happy Trails . . . > > Kevin M. Goess > (and Anne and Frank) > 904 Carmel Ave. > Albany, CA 94706 > (510) 525-5217 > __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com |