Allow Advanced Logging Configuration
- [x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
- [x] I've read and agree to the Code of Conduct.
- [x] I've searched for any related issues and avoided creating a duplicate issue.
Description
Currently, all logging is done to the file specified by LOGFILE, which is configurable. It would be useful to allow more advanced logging configurations via python logging configuration files, as shown here in the python documentation.
Reproducible in:
- [x] This is reproducible in the sample project. RTMBot version: 0.4.0 Python version: 2.7.11 OS Version: All
+1 It would be nice to have access to a logger within plugins.
@onlyanegg we can use python logging to log lines something like the following. You have to just import logging at the top of your python script.
logging.info("Got {} Records".format(len(records)))
And you can get the following log entry
2018-04-17 17:58:03,001 Got 2 Records
This library could use a lot more debug and other logging. I'd prefer it to inherit the app's default logger than implement a logger specific to this package. I've also been adding logging to the underlying slackclient library which will enable more logging within rtmbot.