Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Wanted: Opinions on Logging Frameworks

by 1nickt (Abbot)
on Apr 16, 2018 at 14:35 UTC ( #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
Node Status?
node history
Node Type: note [id://1212993]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2020-10-25 06:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (249 votes). Check out past polls.

    Notices?