From 240400439e6197a3e5b0ed3bb2bf6f2b66856bd3 Mon Sep 17 00:00:00 2001 From: Ryan Huber Date: Thu, 11 Dec 2014 16:31:32 -0800 Subject: [PATCH] allow for no logfile --- rtmbot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rtmbot.py b/rtmbot.py index ea706ea..6642e80 100755 --- a/rtmbot.py +++ b/rtmbot.py @@ -143,7 +143,8 @@ class UnknownChannel(Exception): def main_loop(): - logging.basicConfig(filename=config["LOGFILE"], level=logging.INFO, format='%(asctime)s %(message)s') + if "LOGFILE" in config: + logging.basicConfig(filename=config["LOGFILE"], level=logging.INFO, format='%(asctime)s %(message)s') logging.info(directory) try: bot.start()