i've some python scripts that i run as linux daemons. Today i discovered that one of these (the one that collects data from mqtt topics and store to db) was not running since last week, so maybe i have to take a little more care on logging
Now, the question. What's the correct way to log services?
I mean, probably (i do not know since of my linux noobness) the output of my scripts is logged in some "standard" services output, but this would be also difficult to manage.
So, my idea was to write myself the "logging ability" of my scripts. Something like, different level of logging with different management (like: info is only stored to file, error is stored and mailed), log purging and so on.
But i think i'll not be the first to think about something like that, so maybe there is already a python class/module for this?
And since i'm writing (ok, trying to write
So, how do you manage logging? have you any suggestion for me?
As always, thanks a lot..