eythian,

Hi people. I would like your advice. I have a project[0] where I have hand-rolled a very simple logging system. It works, but I'd like to replace it with something better, at the worst to teach me more about best practices in Perl logging, at best to have a more flexible system.

My requirements are:

  • logging to stdout or whatever
  • when the process finishes (it's running from cron), it puts all logs for that run into a database row so I can see it later, and analyse on common issues.

What I'd like to be able to do:

  • logs only get emitted to stdwhatever if something happens that's WARN or ERROR (this way I can stop getting email if everything goes fine), but if that happens I want all the logs, including info and debug etc to be emitted.
  • an option to emit them all in realtime for when I have to run commands by hand so I can get progress info (given the above.)

How would you suggest I improve things? Please feel free to X/Y problem this if you think there's a better way I can approach it. I'm open to all ideas because I want to learn about them.

TIA!

[0] https://gitlab.com/eythian/exhibit-explorer/-/blob/main/lib/App/ExhibitExplorer/Publisher.pm?ref_type=heads#L331

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • mdbf
  • ethstaker
  • magazineikmin
  • cubers
  • rosin
  • thenastyranch
  • Youngstown
  • InstantRegret
  • slotface
  • osvaldo12
  • kavyap
  • khanakhh
  • Durango
  • megavids
  • everett
  • tacticalgear
  • modclub
  • normalnudes
  • ngwrru68w68
  • cisconetworking
  • tester
  • GTA5RPClips
  • Leos
  • anitta
  • provamag3
  • JUstTest
  • lostlight
  • All magazines