Hello community, here is the log from the commit of package perl-Log-Log4perl for openSUSE:Factory checked in at 2016-11-20 18:17:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Log-Log4perl (Old) and /work/SRC/openSUSE:Factory/.perl-Log-Log4perl.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Log-Log4perl" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Log-Log4perl/perl-Log-Log4perl.changes 2016-03-26 15:20:38.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Log-Log4perl.new/perl-Log-Log4perl.changes 2016-11-20 18:17:22.000000000 +0100 @@ -1,0 +2,18 @@ +Wed Nov 16 06:43:11 UTC 2016 - [email protected] + +- updated to 1.48 + see /usr/share/doc/packages/perl-Log-Log4perl/Changes + + 1.48 (2016/11/14) + * (ms) [rt.cpan.org #117377] Moved PatternLayout's documentation of + DateFormat features to DateFormat.pm to avoid duplication + and keep the two parts consistent, as suggested by Max Carey. + * (ms) [rt.cpan.org #114822] Split two lines with CVS-sensitive + $Log.. variables into two parts. + * (ms) Semaphore issue fixed in Synchronized (reported by + Siarhei Kuchynski and Martin Köhler): + https://github.com/mschilli/log4perl/issues/72 + * (ms) header_text now works with syswrite (reported by Tom Metro): + https://github.com/mschilli/log4perl/issues/73 + +------------------------------------------------------------------- Old: ---- Log-Log4perl-1.47.tar.gz New: ---- Log-Log4perl-1.48.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Log-Log4perl.spec ++++++ --- /var/tmp/diff_new_pack.hNot3I/_old 2016-11-20 18:17:23.000000000 +0100 +++ /var/tmp/diff_new_pack.hNot3I/_new 2016-11-20 18:17:23.000000000 +0100 @@ -17,7 +17,7 @@ Name: perl-Log-Log4perl -Version: 1.47 +Version: 1.48 Release: 0 %define cpan_name Log-Log4perl Summary: Log4j implementation for Perl ++++++ Log-Log4perl-1.47.tar.gz -> Log-Log4perl-1.48.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Log4perl-1.47/Changes new/Log-Log4perl-1.48/Changes --- old/Log-Log4perl-1.47/Changes 2016-03-18 04:58:11.000000000 +0100 +++ new/Log-Log4perl-1.48/Changes 2016-11-15 05:36:58.000000000 +0100 @@ -2,6 +2,18 @@ Revision history for Log::Log4perl ################################################## +1.48 (2016/11/14) + * (ms) [rt.cpan.org #117377] Moved PatternLayout's documentation of + DateFormat features to DateFormat.pm to avoid duplication + and keep the two parts consistent, as suggested by Max Carey. + * (ms) [rt.cpan.org #114822] Split two lines with CVS-sensitive + $Log.. variables into two parts. + * (ms) Semaphore issue fixed in Synchronized (reported by + Siarhei Kuchynski and Martin Köhler): + https://github.com/mschilli/log4perl/issues/72 + * (ms) header_text now works with syswrite (reported by Tom Metro): + https://github.com/mschilli/log4perl/issues/73 + 1.47 (2016/03/17) * (ms) [rt.cpan.org #102647] Slaven Rezic fixed a test case for file permissions diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Log4perl-1.47/META.json new/Log-Log4perl-1.48/META.json --- old/Log-Log4perl-1.47/META.json 2016-03-18 04:58:49.000000000 +0100 +++ new/Log-Log4perl-1.48/META.json 2016-11-15 05:39:02.000000000 +0100 @@ -45,5 +45,5 @@ }, "x_MailingList" : "mailto:[email protected]" }, - "version" : "1.47" + "version" : "1.48" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Log4perl-1.47/META.yml new/Log-Log4perl-1.48/META.yml --- old/Log-Log4perl-1.47/META.yml 2016-03-18 04:58:49.000000000 +0100 +++ new/Log-Log4perl-1.48/META.yml 2016-11-15 05:39:02.000000000 +0100 @@ -24,4 +24,4 @@ resources: MailingList: mailto:[email protected] repository: http://github.com/mschilli/log4perl -version: '1.47' +version: '1.48' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Log4perl-1.47/README new/Log-Log4perl-1.48/README --- old/Log-Log4perl-1.47/README 2016-03-18 04:58:49.000000000 +0100 +++ new/Log-Log4perl-1.48/README 2016-11-15 05:39:02.000000000 +0100 @@ -1,5 +1,5 @@ ###################################################################### - Log::Log4perl 1.47 + Log::Log4perl 1.48 ###################################################################### NAME @@ -1738,7 +1738,7 @@ level, i.e. WARN becomes INFO, INFO becomes DEBUG, etc. To only modify selected ones, use - # decrease thresholds of all appenders + # decrease thresholds of selected appenders Log::Log4perl->appender_thresholds_adjust(-1, ['AppName1', ...]); and pass the names of affected appenders in a ref to an array. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Log4perl-1.47/lib/Log/Log4perl/Appender/File.pm new/Log-Log4perl-1.48/lib/Log/Log4perl/Appender/File.pm --- old/Log-Log4perl-1.47/lib/Log/Log4perl/Appender/File.pm 2015-04-18 23:32:39.000000000 +0200 +++ new/Log-Log4perl-1.48/lib/Log/Log4perl/Appender/File.pm 2016-11-15 05:36:58.000000000 +0100 @@ -171,8 +171,11 @@ if( $self->{header_text} !~ /\n\Z/ ) { $self->{header_text} .= "\n"; } - my $fh = $self->{fh}; - print $fh $self->{header_text}; + + # quick and dirty print/syswrite without the usual + # log() recreate magic. + local $self->{recreate} = 0; + $self->log( message => $self->{header_text} ); } } @@ -243,6 +246,11 @@ ################################################## my($self, %params) = @_; + # Warning: this function gets called by file_open() which assumes + # it can use it as a simple print/syswrite wrapper by temporary + # disabling the 'recreate' entry. Add anything fancy here and + # fix up file_open() accordingly. + if($self->{recreate}) { if($self->{recreate_check_signal}) { if(!$self->{watcher} or diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Log4perl-1.47/lib/Log/Log4perl/Config.pm new/Log-Log4perl-1.48/lib/Log/Log4perl/Config.pm --- old/Log-Log4perl-1.47/lib/Log/Log4perl/Config.pm 2016-01-27 07:12:46.000000000 +0100 +++ new/Log-Log4perl-1.48/lib/Log/Log4perl/Config.pm 2016-11-15 05:36:58.000000000 +0100 @@ -181,7 +181,10 @@ if(exists $data->{utcDateTimes}) { require Log::Log4perl::DateFormat; - $Log::Log4perl::DateFormat::GMTIME = !!$data->{utcDateTimes}->{value}; + # Need to split this up in two lines, or CVS will + # mess it up. + $Log::Log4perl::DateFormat::GMTIME = + !!$data->{utcDateTimes}->{value}; } # Boolean filters diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Log4perl-1.47/lib/Log/Log4perl/DateFormat.pm new/Log-Log4perl-1.48/lib/Log/Log4perl/DateFormat.pm --- old/Log-Log4perl-1.47/lib/Log/Log4perl/DateFormat.pm 2016-01-06 05:51:05.000000000 +0100 +++ new/Log-Log4perl-1.48/lib/Log/Log4perl/DateFormat.pm 2016-11-15 05:36:58.000000000 +0100 @@ -317,36 +317,33 @@ =head1 SYNOPSIS - use Log::Log4perl::DateFormat; - my $format = Log::Log4perl::DateFormat->new("HH:mm:ss,SSS"); + # Either in a log4j.conf file ... + log4perl.appender.Logfile.layout = \ + Log::Log4perl::Layout::PatternLayout + log4perl.appender.Logfile.layout.ConversionPattern = %d{MM/dd HH:mm} %m + + # ... or via the PatternLayout class ... + use Log::Log4perl::Layout::PatternLayout; + my $layout = Log::Log4perl::Layout::PatternLayout->new( + "%d{HH:mm:ss,SSS} %m"); - # Simple time, resolution in seconds + # ... or even directly with this helper class: + use Log::Log4perl::DateFormat; + my $format = Log::Log4perl::DateFormat->new("HH:mm:ss,SSS"); my $time = time(); print $format->format($time), "\n"; # => "17:02:39,000" - # Advanced time, resultion in milliseconds - use Time::HiRes; - my ($secs, $msecs) = Time::HiRes::gettimeofday(); - print $format->format($secs, $msecs), "\n"; - # => "17:02:39,959" - =head1 DESCRIPTION -C<Log::Log4perl::DateFormat> is a low-level helper class for the -advanced date formatting functions in C<Log::Log4perl::Layout::PatternLayout>. - -Unless you're writing your own Layout class like -L<Log::Log4perl::Layout::PatternLayout>, there's probably not much use -for you to read this. - -C<Log::Log4perl::DateFormat> is a formatter which allows dates to be -formatted according to the log4j spec on +C<Log::Log4perl::DateFormat> is a helper class for the +advanced date formatting functions in C<Log::Log4perl::Layout::PatternLayout>, +and adheres (mostly) to the log4j SimpleDateFormat spec available on http://download.oracle.com/javase/1.4.2/docs/api/java/text/SimpleDateFormat.html -which allows the following placeholders to be recognized and processed: +It supports the following placeholders: Symbol Meaning Presentation Example ------ ------- ------------ ------- @@ -373,13 +370,38 @@ ' escape for text (Delimiter) '' single quote (Literal) ' -For example, if you want to format the current Unix time in -C<"MM/dd HH:mm"> format, all you have to do is this: + Presentation explanation: - use Log::Log4perl::DateFormat; + (Text): 4 or more pattern letters--use full form, < 4--use short or + abbreviated form if one exists. - my $format = Log::Log4perl::DateFormat->new("MM/dd HH:mm"); + (Number): the minimum number of digits. Shorter numbers are + zero-padded to this amount. Year is handled + specially; that is, if the count of 'y' is 2, the + Year will be truncated to 2 digits. + + (Text & Number): 3 or over, use text, otherwise use number. +For example, if you want to format the current Unix time in C<"MM/dd HH:mm"> +format, all you have to do is specify it in the %d{...} section of the +PatternLayout in a Log4perl configuration file: + + # log4j.conf + # ... + log4perl.appender.Logfile.layout = \ + Log::Log4perl::Layout::PatternLayout + log4perl.appender.Logfile.layout.ConversionPattern = %d{MM/dd HH:mm} %m + +Same goes for Perl code defining a PatternLayout for Log4perl: + + use Log::Log4perl::Layout::PatternLayout; + my $layout = Log::Log4perl::Layout::PatternLayout->new( + "%d{MM/dd HH:mm} %m"); + +Or, on a lower level, you can use the class directly: + + use Log::Log4perl::DateFormat; + my $format = Log::Log4perl::DateFormat->new("MM/dd HH:mm"); my $time = time(); print $format->format($time), "\n"; @@ -427,9 +449,20 @@ Also, C<Log::Log4perl::DateFormat> just knows about English week and month names, internationalization support has to be added. +=head1 Millisecond Times + +More granular timestamps down to the millisecond are also supported, +just provide the millsecond count as a second argument: + + # Advanced time, resultion in milliseconds + use Time::HiRes; + my ($secs, $msecs) = Time::HiRes::gettimeofday(); + print $format->format($secs, $msecs), "\n"; + # => "17:02:39,959" + =head1 LICENSE -Copyright 2002-2013 by Mike Schilli E<lt>[email protected]<gt> +Copyright 2002-2016 by Mike Schilli E<lt>[email protected]<gt> and Kevin Goess E<lt>[email protected]<gt>. This library is free software; you can redistribute it and/or modify diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Log4perl-1.47/lib/Log/Log4perl/Layout/PatternLayout.pm new/Log-Log4perl-1.48/lib/Log/Log4perl/Layout/PatternLayout.pm --- old/Log-Log4perl-1.47/lib/Log/Log4perl/Layout/PatternLayout.pm 2015-04-18 23:32:39.000000000 +0200 +++ new/Log-Log4perl-1.48/lib/Log/Log4perl/Layout/PatternLayout.pm 2016-11-15 05:36:58.000000000 +0100 @@ -541,7 +541,6 @@ my $layout = Log::Log4perl::Layout::PatternLayout->new( "%d (%F:%L)> %m"); - =head1 DESCRIPTION Creates a pattern layout according to @@ -639,44 +638,17 @@ (which is slightly different from Log4j which uses C<yyyy-MM-dd HH:mm:ss,SSS>) you're free to fine-tune it in order to display only certain characteristics of a date, according to the SimpleDateFormat in the Java World -(http://java.sun.com/j2se/1.3/docs/api/java/text/SimpleDateFormat.html): +(http://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html): %d{HH:mm} "23:45" -- Just display hours and minutes %d{yy, EEEE} "02, Monday" -- Just display two-digit year and spelled-out weekday -Here's the symbols and their meaning, according to the SimpleDateFormat -specification: + %d{e} "1473741760" -- Epoch seconds + %d{h a} "12 PM" -- Hour and am/pm marker + ... and many more - Symbol Meaning Presentation Example - ------ ------- ------------ ------- - G era designator (Text) AD - y year (Number) 1996 - M month in year (Text & Number) July & 07 - d day in month (Number) 10 - h hour in am/pm (1-12) (Number) 12 - H hour in day (0-23) (Number) 0 - m minute in hour (Number) 30 - s second in minute (Number) 55 - E day in week (Text) Tuesday - D day in year (Number) 189 - a am/pm marker (Text) PM - e epoch seconds (Number) 1315011604 - - (Text): 4 or more pattern letters--use full form, < 4--use short or - abbreviated form if one exists. - - (Number): the minimum number of digits. Shorter numbers are - zero-padded to this amount. Year is handled - specially; that is, if the count of 'y' is 2, the - Year will be truncated to 2 digits. - - (Text & Number): 3 or over, use text, otherwise use number. - -There's also a bunch of pre-defined formats: - - %d{ABSOLUTE} "HH:mm:ss,SSS" - %d{DATE} "dd MMM yyyy HH:mm:ss,SSS" - %d{ISO8601} "yyyy-MM-dd HH:mm:ss,SSS" +For an exhaustive list of all supported date features, look at +L<Log::Log4perl::DateFormat>. =head2 Custom cspecs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Log4perl-1.47/lib/Log/Log4perl/Util/Semaphore.pm new/Log-Log4perl-1.48/lib/Log/Log4perl/Util/Semaphore.pm --- old/Log-Log4perl-1.47/lib/Log/Log4perl/Util/Semaphore.pm 2015-04-18 23:32:39.000000000 +0200 +++ new/Log-Log4perl-1.48/lib/Log/Log4perl/Util/Semaphore.pm 2016-11-15 05:36:58.000000000 +0100 @@ -57,15 +57,17 @@ 1, &IPC_EXCL|&IPC_CREAT|($self->{mode}||0777), ); - + if(! defined $self->{id} and $! == EEXIST) { print "Semaphore '$self->{key}' already exists\n" if INTERNAL_DEBUG; - $self->{id} = semget( $self->{ikey}, 1, 0 ) + defined( $self->{id} = semget( $self->{ikey}, 1, 0 ) ) or die "semget($self->{ikey}) failed: $!"; } elsif($!) { die "Cannot create semaphore $self->{key}/$self->{ikey} ($!)"; } + + print "Semaphore has id $self->{id}\n" if INTERNAL_DEBUG; } ########################################### @@ -154,7 +156,7 @@ ########################################### my($self) = @_; - print "Removing semaphore '$self->{key}'\n" if INTERNAL_DEBUG; + print "Removing semaphore '$self->{key}/$self->{id}'\n" if INTERNAL_DEBUG; semctl ($self->{id}, 0, &IPC_RMID, 0) or die "Removing semaphore $self->{key} failed: $!"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Log4perl-1.47/lib/Log/Log4perl.pm new/Log-Log4perl-1.48/lib/Log/Log4perl.pm --- old/Log-Log4perl-1.47/lib/Log/Log4perl.pm 2016-03-18 04:53:42.000000000 +0100 +++ new/Log-Log4perl-1.48/lib/Log/Log4perl.pm 2016-11-15 05:36:58.000000000 +0100 @@ -16,7 +16,7 @@ use Log::Log4perl::Config; use Log::Log4perl::Appender; -our $VERSION = '1.47'; +our $VERSION = '1.48'; # set this to '1' if you're using a wrapper # around Log::Log4perl @@ -111,11 +111,11 @@ my $name = "$caller_pkg\::$key"; # Need to split this up in two lines, or CVS will # mess it up. - my $value = $ - Log::Log4perl::Level::PRIORITY{$key}; + my $value = $Log::Log4perl::Level::PRIORITY{ + $key}; no strict qw(refs); *{"$name"} = \$value; - } + } delete $tags{':levels'}; } @@ -615,7 +615,10 @@ Log::Log4perl->easy_closure_logger_remove( $logger ); # Remove the logger from the system - delete $Log::Log4perl::Logger::LOGGERS_BY_NAME->{ $logger->{category} }; + # Need to split this up in two lines, or CVS will + # mess it up. + delete $Log::Log4perl::Logger::LOGGERS_BY_NAME->{ + $logger->{category} }; } 1; @@ -2469,7 +2472,7 @@ one level, i.e. WARN becomes INFO, INFO becomes DEBUG, etc. To only modify selected ones, use - # decrease thresholds of all appenders + # decrease thresholds of selected appenders Log::Log4perl->appender_thresholds_adjust(-1, ['AppName1', ...]); and pass the names of affected appenders in a ref to an array. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Log4perl-1.47/t/026FileApp.t new/Log-Log4perl-1.48/t/026FileApp.t --- old/Log-Log4perl-1.47/t/026FileApp.t 2015-11-16 03:31:38.000000000 +0100 +++ new/Log-Log4perl-1.48/t/026FileApp.t 2016-11-15 05:36:58.000000000 +0100 @@ -49,7 +49,7 @@ my $testfile = File::Spec->catfile($WORK_DIR, "test26.log"); my $testpath = File::Spec->catfile($WORK_DIR, "test26"); -BEGIN {plan tests => 26} +BEGIN {plan tests => 27} sub unlink_testfiles { unlink $testfile; @@ -438,6 +438,26 @@ is($content, "This is a nice header.\n", "header_text"); + +# same with syswrite +unlink "${testfile}_5"; +$data = qq( +log4perl.category = DEBUG, Logfile +log4perl.appender.Logfile = Log::Log4perl::Appender::File +log4perl.appender.Logfile.filename = ${testfile}_5 +log4perl.appender.Logfile.header_text = This is a nice header. +log4perl.appender.Logfile.syswrite = 1 +log4perl.appender.Logfile.layout = Log::Log4perl::Layout::SimpleLayout +); + +Log::Log4perl->init(\$data); +Log::Log4perl->get_logger->debug( "waah!" ); +open FILE, "<${testfile}_5" or die "Cannot open ${testfile}_5"; +$content = join '', <FILE>; +close FILE; + +is($content, "This is a nice header.\nDEBUG - waah!\n", "header_text"); + #################################################### # Create path if it is not already created #################################################### diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Log4perl-1.47/t/042SyncApp.t new/Log-Log4perl-1.48/t/042SyncApp.t --- old/Log-Log4perl-1.47/t/042SyncApp.t 2015-04-18 23:32:39.000000000 +0200 +++ new/Log-Log4perl-1.48/t/042SyncApp.t 2016-11-15 05:36:58.000000000 +0100 @@ -43,7 +43,6 @@ my $logfile = "$EG_DIR/fork.log"; our $lock; -our $locker; our $locker_key = "abc"; unlink $logfile; @@ -51,11 +50,11 @@ #goto SECOND; #print "tie\n"; -$locker = Log::Log4perl::Util::Semaphore->new( - key => $locker_key, +my $locker1 = Log::Log4perl::Util::Semaphore->new( + key => $locker_key, ); -print $locker->status_as_string, "\n" if INTERNAL_DEBUG; +print $locker1->status_as_string, "\n" if INTERNAL_DEBUG; my $conf = qq( log4perl.category.Bar.Twix = WARN, Syncer @@ -69,9 +68,10 @@ log4perl.appender.Syncer = Log::Log4perl::Appender::Synchronized log4perl.appender.Syncer.appender = Logfile log4perl.appender.Syncer.key = blah +#log4perl.appender.Syncer.destroy = 1 ); -$locker->semlock(); +$locker1->semlock(); Log::Log4perl::init(\$conf); @@ -82,7 +82,7 @@ my $logger = get_logger("Bar::Twix"); if($pid) { #parent - $locker->semlock(); + $locker1->semlock(); #print "Waiting for child\n"; for(1..10) { #print "Parent: Writing\n"; @@ -90,7 +90,7 @@ } } else { #child - $locker->semunlock(); + $locker1->semunlock(); for(1..10) { #print "Child: Writing\n"; $logger->error("Y" x 4097); @@ -131,8 +131,8 @@ unlink $logfile; #print "tie\n"; -$locker = Log::Log4perl::Util::Semaphore->new( - key => $locker_key, +my $locker2 = Log::Log4perl::Util::Semaphore->new( + key => $locker_key, ); $conf = q{ @@ -144,13 +144,13 @@ }; print "1 Semunlock\n" if $INTERNAL_DEBUG; -print $locker->status_as_string, "\n" if INTERNAL_DEBUG; -$locker->semunlock(); +print $locker2->status_as_string, "\n" if INTERNAL_DEBUG; +$locker2->semunlock(); print "1 Done semunlock\n" if $INTERNAL_DEBUG; print "2 Semlock\n" if $INTERNAL_DEBUG; -print $locker->status_as_string, "\n" if INTERNAL_DEBUG; -$locker->semlock(); +print $locker2->status_as_string, "\n" if INTERNAL_DEBUG; +$locker2->semlock(); print "2 Done semlock\n" if $INTERNAL_DEBUG; #print "forking\n"; @@ -162,7 +162,7 @@ #parent #print "Waiting for child\n"; print "Before semlock\n" if $INTERNAL_DEBUG; - $locker->semlock(); + $locker2->semlock(); print "Done semlock\n" if $INTERNAL_DEBUG; { @@ -207,7 +207,7 @@ # Ready to receive #print "Server started\n"; print "Before semunlock\n" if $INTERNAL_DEBUG; - $locker->semunlock(); + $locker2->semunlock(); print "After semunlock\n" if $INTERNAL_DEBUG; my $nof_messages = 2; @@ -273,8 +273,8 @@ # silently ignored $logger->warn("message lost"); -$locker->semunlock(); -$locker->semlock(); +$locker2->semunlock(); +$locker2->semlock(); # Now start a server $pid = fork(); @@ -284,7 +284,7 @@ # wait for child #print "Waiting for server to start\n"; - $locker->semlock(); + $locker2->semlock(); # Send another message (should be sent) #print "Sending message\n"; @@ -303,7 +303,7 @@ die "Cannot start server: $!" unless defined $sock; # Ready to receive #print "Server started\n"; - $locker->semunlock(); + $locker2->semunlock(); my $nof_messages = 1; @@ -337,3 +337,15 @@ unlike($data, qr/message lost/, "Check logfile for lost message"); like($data, qr/message sent/, "Check logfile for sent message"); + +# $locker2 has the same semid, no need to remove + +my $locker3 = Log::Log4perl::Util::Semaphore->new( + key => "xyz", +); +my $locker4 = Log::Log4perl::Util::Semaphore->new( + key => "xyz", +); + +$locker1->remove; +$locker3->remove; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Log4perl-1.47/t/lib/Log4perlInternalTest.pm new/Log-Log4perl-1.48/t/lib/Log4perlInternalTest.pm --- old/Log-Log4perl-1.47/t/lib/Log4perlInternalTest.pm 2015-04-18 23:32:39.000000000 +0200 +++ new/Log-Log4perl-1.48/t/lib/Log4perlInternalTest.pm 2016-11-15 05:36:58.000000000 +0100 @@ -18,7 +18,8 @@ # check if we're on non-unixy system sub is_like_windows { if( $^O eq "MSWin32" or - $^O eq "cygwin" ) { + $^O eq "cygwin" or + $^O eq "msys" ) { return 1; }
