|
From: Jim C. <jc...@di...> - 2003-06-19 17:46:51
|
Mike, etal,
I just tested Log4perl against perl 5.8.x MAINT19732
attached (and included below) is a patch to fix
1 a syntax error in Level,
2 a NOT-READY one against t/032RollingFile.t
1st corrects syntax which is a variant of
my $foo = 1 if $bar; # which is deprecated
I commented out 'use vars', presumably youll delete it.
2. the test file has a my $WORK_DIR redefined, but with that fixed still
fails for me on rotation tests.
$> more t/tmp/rolltest.log
INFO cat1 - info message 1
WARN cat1 - warning message 1
FATAL cat1 - fatal message 1
I presume there to be some incompleteness in the Log::Dispatch replacement.
I dug a bit, but dont have time to finish the job.
hth, jimc
diff -ur Log-Log4perl-0.34/lib/Log/Log4perl/Level.pm
Log-Log4perl-0.34-patched/lib/Log/Log4perl/Level.pm
--- Log-Log4perl-0.34/lib/Log/Log4perl/Level.pm Sat May 31 11:23:21 2003
+++ Log-Log4perl-0.34-patched/lib/Log/Log4perl/Level.pm Thu Jun 19
06:53:06 2003
@@ -19,12 +19,13 @@
use constant OFF_INT => (2 ** 31) - 1;
no strict qw(refs);
-use vars qw(%PRIORITY %LEVELS);
+#use vars qw(%PRIORITY %LEVELS);
+our (%PRIORITY, %LEVELS, %SYSLOG, %L4P_TO_LD);
-our %PRIORITY = (); # unless (%PRIORITY);
-our %LEVELS = () unless (%LEVELS);
-our %SYSLOG = () unless (%SYSLOG);
-our %L4P_TO_LD = () unless (%L4P_TO_LD);
+%PRIORITY = (); # unless (%PRIORITY);
+%LEVELS = () unless (%LEVELS);
+%SYSLOG = () unless (%SYSLOG);
+%L4P_TO_LD = () unless (%L4P_TO_LD);
sub add_priority {
my ($prio, $intval, $syslog, $log_dispatch_level) = @_;
Only in Log-Log4perl-0.34-patched/lib/Log/Log4perl: Level.pm~
Only in Log-Log4perl-0.34-patched/: pm_to_blib
diff -ur Log-Log4perl-0.34/t/032JRollFile.t
Log-Log4perl-0.34-patched/t/032JRollFile.t
--- Log-Log4perl-0.34/t/032JRollFile.t Sat May 31 11:38:55 2003
+++ Log-Log4perl-0.34-patched/t/032JRollFile.t Thu Jun 19 06:56:46 2003
@@ -21,7 +21,7 @@
mkdir("$WORK_DIR", 0755) || die "can't create $WORK_DIR ($!)";
}
-my $WORK_DIR = File::Spec->catfile(qw(t tmp));
+$WORK_DIR = File::Spec->catfile(qw(t tmp));
use vars qw(@outfiles); @outfiles = (File::Spec->catfile($WORK_DIR,
'rolltest.log'),
File::Spec->catfile($WORK_DIR,
'rolltest.log.1'),
File::Spec->catfile($WORK_DIR,
'rolltest.log.2'),);
@@ -64,6 +64,6 @@
ok(! -e File::Spec->catfile($WORK_DIR, 'rolltest.log.3'));
foreach my $f (@outfiles){
- unlink $f if (-e $f);
+ #unlink $f if (-e $f);
}
|