Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Wanted: Opinions on Logging Frameworks

by 1nickt (Canon)
on Apr 16, 2018 at 14:35 UTC ( [id://1212993]=note: print w/replies, xml ) Need Help??


in reply to Wanted: Opinions on Logging Frameworks

Hi, FYI you can use Log::Any as the logger and Log::Dispatch as the output adapter, which then allows you to output to different destinations (file + screen for example).

Edit: Also you can use Log::Log4perl as the output adapter for Log::Any if you choose ...


The way forward always starts with a minimal test.
  • Comment on Re: Wanted: Opinions on Logging Frameworks

Replies are listed 'Best First'.
Re^2: Wanted: Opinions on Logging Frameworks
by learnedbyerror (Monk) on Apr 16, 2018 at 16:32 UTC

    Why do you like Log::Any for log production and Log::Dispatch for log consumption?

    Functionally, I can achieve the same thing with Log:::Log4perl appenders without have to use but one framework

    Please don't take my question and comment as being defensive or as an attack. I ask to understand. I agree that what you describe is technically correct.

      Because if I use Log::Any for production, I can use any adapter for consumption, meaning I can swap out or override easily. Also because most of the CPAN modules I like use Log::Any so I can control output from them in my own logging framework.

      Also note that I only gave Log::Dispatch as an example of an adapter, one that can multiplex. Normally you only need to load Log::Any and can use the default adapters that are provided with the companion Log::Any::Adapter.


      The way forward always starts with a minimal test.

        Thank you for your explanation. It makes a lot of sense. I'm off to MetaCPAN now to look at what modules have a reverse dependency on Log::Any :)

        lbe

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1212993]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-24 18:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found