Discussion:
[log4perl-devel] Suggested enhancement
Dave Pointon
2014-02-28 10:32:00 UTC
Permalink
Hi gents ,

Sorry to trouble you again, but this time it's an enhancement suggestion
to the wonderful world of L4P, but first a little background ... whilst
developing a bespoke package that uses L4P indirectly (it 'use's a
package that 'use's a package to try and subclass L4P), I was seeing a
carp message that pointed to the 'use' statement - in order to ascertain
the exact root cause, I edited the L4P Appender.pm, in-situ, to change
the carp to a cluck.

My enhancement would be to select e.g. via an environment or package
variable, whether carp or cluck is used to generate any warnings in
order to facilitate problem resolution.

Best rgds ,
--
Dave Pointon FIAP MBCS

Now I saw, tho' too late, the folly of beginning a work before we count
the cost and before we we judge rightly of our strength to go thro'
with it - Robinson Crusoe
Mike Schilli
2014-03-01 00:39:16 UTC
Permalink
whilst developing a bespoke package that uses L4P indirectly (it
'use's a package that 'use's a package to try and subclass L4P), I was
seeing a carp message that pointed to the 'use' statement
Actually, the register_wrapper() call should take care of that problem:

http://search.cpan.org/dist/Log-Log4perl/lib/Log/Log4perl.pm#Using_Log::Log4perl_with_wrapper_functions_and_classes

If not, do you have a short code example to illustrate the problem?
My enhancement would be to select e.g. via an environment or package
variable, whether carp or cluck is used to generate any warnings in
order to facilitate problem resolution.
That'd be a nice addition to Carp.pm :).
--
-- Mike

Mike Schilli
***@perlmeister.com
Loading...