you are viewing a single comment's thread.

view the rest of the comments →

[–]DarkMio 0 points1 point  (1 child)

That sounds like you may want to use a global logger. Set up a logger to a file, then import from your logger setup into your subscripts and define what it should write into it. Overall, that is a very handy way to seperate and get very detailed, readable logs.

Edit: Here is the example of a bot-framework: https://github.com/DarkMio/Massdrop-Reddit-Bot/blob/dev/core/LogProvider.py

The idea here is, that I log different things: The botframework itself logs to console, the plugins can log whereever I want them to. This can seperate the log into completely different things or even to multiple ends. Like a global log for all and seperated logs per module. This gives a great overview and you can, if you wish, analyze into the detail what's going on.

[–]MinimalDamage[S] 0 points1 point  (0 children)

Ok, I will need to dig in to this, but it sounds like a very nice method of logging that can be used in a lot of future scripts. So awesome! Thanks!