aboutsummaryrefslogtreecommitdiffstats
path: root/subreddit.py
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2023-06-06 12:07:52 +0000
committerjwansek <eddie.atten.ea29@gmail.com>2023-06-06 12:07:52 +0000
commit2625a7cf2100cd88d763fd421062a36dcb49d008 (patch)
treefb677bd650e431a41305d805dee8d2a9ca28c753 /subreddit.py
parente050e04eb999f94ceffbe733b73d5aa06dd82a2e (diff)
parent0cb69efde8e73a0331a267615f046b9d22579476 (diff)
downloadSmallYTChannelBot-2625a7cf2100cd88d763fd421062a36dcb49d008.tar.gz
SmallYTChannelBot-2625a7cf2100cd88d763fd421062a36dcb49d008.zip
Merge branch 'master' of git.eda.gay:SmallYTChannelBot
Diffstat (limited to 'subreddit.py')
-rwxr-xr-xsubreddit.py24
1 files changed, 16 insertions, 8 deletions
diff --git a/subreddit.py b/subreddit.py
index 497359f..e92c1d9 100755
--- a/subreddit.py
+++ b/subreddit.py
@@ -27,19 +27,27 @@ FREE_FLAIRS = CONFIG["free_flairs"]
IMGUR = ImgurClient(**CONFIG["imgurapi"])
-logging.basicConfig(
- format = "%(process)s\t[%(asctime)s]\t%(message)s",
- level = logging.INFO,
- handlers=[
- logging.FileHandler("actions.log"),
- logging.StreamHandler()
- ])
+# logging.basicConfig(
+# format = "%(process)s\t[%(asctime)s]\t%(message)s",
+# level = logging.INFO,
+# handlers=[
+# logging.FileHandler("actions.log"),
+# logging.StreamHandler()
+# ])
+
+handler = logging.FileHandler("/logs/api.log")
+handler.setLevel(logging.DEBUG)
+for logger_name in ("praw", "prawcore"):
+ logger = logging.getLogger(logger_name)
+ logger.setLevel(logging.DEBUG)
+ logger.addHandler(handler)
def get_time():
return time.strftime("%b %d %Y %H:%M:%S", time.gmtime())
def display(message, concerning = None):
- logging.info(message)
+ # logging.info(message)
+ print(message)
#yes it'd be prettier to do this with a logging.Handler, but alas
#due to `concerning` it'd be more complicated than doing it like this