Skip Menu |

This queue is for tickets about the Log-Any-Adapter-Syslog CPAN distribution.

Report information
The Basics
Id: 69855
Status: resolved
Priority: 0/
Queue: Log-Any-Adapter-Syslog

People
Owner: Nobody in particular
Requestors: stephen.thirlwall [...] strategicdata.com.au
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.2
Fixed in: 1.3



Subject: openlog gets called multiple times
Please see https://github.com/sdt/Log-Any-Adapter-Syslog/commit/e69e1c17d0e4eb90fb888dc67689e51c6c0bee0e I don't have a test case for this problem, but simply tracing out a message before the call to openlog makes it pretty obvious. The commit message for the above patch: Moved the $_opened flag to package scope. Each package that does 'use Log::Any qw($log)' gets its own $log object. New Adapter objects are created for each one, and each only gets init() called once. Each adapter object has the same hash keys/values, except for $self->{category}. Changed the $_opened flag to package scope to correctly guard against calling openlog multiple times. Cheers, Stephen Thirlwall
On Wed Jul 27 23:56:03 2011, sdt wrote: Show quoted text
> Please see > https://github.com/sdt/Log-Any-Adapter- > Syslog/commit/e69e1c17d0e4eb90fb888dc67689e51c6c0bee0e
Moved to: https://github.com/sdt/Log-Any-Adapter-Syslog-PATCHES/commit/e69e1c17d0e4eb90fb888dc67689e51c6c0bee0e
Fixed in v1.3