Have you looked at Log::Any? It's pretty lightweight, has sensible defaults and means that I, as the module writer, don't need to make any arbitrary decisions about how the user of my module wants their logging set up.
| [reply] |
What's wrong with Log::Log4perl ?
| [reply] |
To me, Log::Log4perl requires a lot of configuration to set up properly and I feel it could do with more convenient ways to switch log-producing locations on and off.
On the other hand, Log::Log4perl can be configured to separate out different logging messages and different logging sources into different output streams, so it's not all bad if you have a larger application of which WWW::Mechanize::Chrome is just a part.
| [reply] |
Huh. I've used Log::Log4perl at one client since 2018, and it's worked very well. Sure, turning logging up or down does require me to edit a file, but that's fine. I usually send INFO messages to the screen, but send DEBUG messages to the log, and ERROR messages go by E-Mail. I started to work on also getting ERRORs sent to Slack, but got busy with other stuff.
The module also takes care of rotating the log files (size, number of backups to keep), which is super handy. I haven't tried any other logging modules because Log4perl does everything I need and Just Works.
Alex / talexb / Toronto
As of June 2025, Groklaw is back! This site was a really valuable resource in the now ancient fight between SCO and Linux. As it turned out, SCO was all hat and no cattle.Thanks to PJ for all her work, we owe her so much. RIP -- 2003 to 2013.
| [reply] |
| [reply] |