scrapinghub / slackbot

A chat bot for Slack (https://slack.com).
MIT License
1.26k stars 394 forks source link

How can I log for debugging purposes my own plugins methods? #113

Closed roperi closed 7 years ago

roperi commented 7 years ago

I just started playing with slackbot and I'm not a Python high-level expert so sorry if this is a very naive question.

If I make a mistake in my own plugins (eg. 'myplugins/hi.py') slackbot wouldn't load my 'myplugins' folder and will falll back to the default plugins folder. Thing is I wouldn't know what happened. So how can I log for debugging purposes my very own plugins methods?

In short, what would be the best course of action? Is it a good practice to put my own logger handlers in my own plugins?

Also, I noticed there's a logger in the core files but I don't see console nor file handlers. Is that normal? Shouldn't we have a console handler at the very least? In fact, I can't see any log files being created whatsoever. Am I missing something?

roperi commented 7 years ago

I'm closing this. I ended using my own loggers.