diff options
author | 2018-10-11 19:54:24 +0100 | |
---|---|---|
committer | 2018-10-11 19:54:24 +0100 | |
commit | 34e866bc1e11570a191fe3efddb6047f3470b4ba (patch) | |
tree | c589989d827d61efac41051f8e71d4da98da35a1 /bot/__init__.py | |
parent | Run bash script with bash (diff) | |
parent | Merge pull request #40 from hundredrab/spooky-reacts (diff) |
Merge remote-tracking branch 'origin/master' into deploy
# Conflicts:
# bot/__init__.py
# bot/__main__.py
# bot/cogs/hacktoberstats.py
# bot/cogs/movie.py
Diffstat (limited to 'bot/__init__.py')
-rw-r--r-- | bot/__init__.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/bot/__init__.py b/bot/__init__.py index 1d320245..c2ea4ba0 100644 --- a/bot/__init__.py +++ b/bot/__init__.py @@ -3,7 +3,6 @@ import os # set up logging - log_dir = 'log' log_file = log_dir + os.sep + 'hackbot.log' os.makedirs(log_dir, exist_ok=True) @@ -23,9 +22,14 @@ if root.handlers: for handler in root.handlers: root.removeHandler(handler) -# setup new logging configuration -logging.basicConfig(format='%(asctime)s - %(name)s %(levelname)s: %(message)s', datefmt="%D %H:%M:%S", - level=logging.DEBUG, - handlers=[console_handler, file_handler]) +# Silence irrelevant loggers +logging.getLogger("discord").setLevel(logging.ERROR) -logging.info('Logging Process Started') +# setup new logging configuration +logging.basicConfig( + format='%(asctime)s - %(name)s %(levelname)s: %(message)s', + datefmt="%D %H:%M:%S", + level=logging.DEBUG, + handlers=[console_handler, file_handler] +) +logging.getLogger().info('Logging initialization complete') |