Add a logger.
This commit is contained in:
parent
7ef5a8ceee
commit
89bcc1717e
1 changed files with 8 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
||||||
import datetime
|
import datetime
|
||||||
|
import logging
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
import traceback
|
import traceback
|
||||||
|
@ -20,6 +21,13 @@ if bot is None or bot.praw != praw:
|
||||||
bot = bot4
|
bot = bot4
|
||||||
|
|
||||||
|
|
||||||
|
log = logging.getLogger(__name__)
|
||||||
|
log.setLevel(logging.NOTSET)
|
||||||
|
handler = logging.StreamHandler()
|
||||||
|
handler.setLevel(logging.NOTSET)
|
||||||
|
handler.setFormatter(logging.Formatter('%(levelname)s:timesearch.%(module)s: %(message)s'))
|
||||||
|
log.addHandler(handler)
|
||||||
|
|
||||||
r = bot.anonymous()
|
r = bot.anonymous()
|
||||||
|
|
||||||
def assert_file_exists(filepath):
|
def assert_file_exists(filepath):
|
||||||
|
|
Loading…
Reference in a new issue