From 965c90def341ba0d0f88757ac7fbbaa0d42235ea Mon Sep 17 00:00:00 2001 From: hockeygoalie35 Date: Tue, 13 Feb 2024 23:06:59 -0500 Subject: [PATCH] v1.5 - Python script appends current log --- lidarr/python/ARLChecker.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lidarr/python/ARLChecker.py b/lidarr/python/ARLChecker.py index d747c94..9625a9b 100644 --- a/lidarr/python/ARLChecker.py +++ b/lidarr/python/ARLChecker.py @@ -3,7 +3,7 @@ from pathlib import Path from dataclasses import dataclass from requests import Session from argparse import ArgumentParser -from sys import argv +from sys import argv, stdout from colorama import Fore, init from telegram import Update from telegram.ext import ApplicationBuilder, ContextTypes, CommandHandler @@ -26,8 +26,10 @@ logging.basicConfig( format=f'%(asctime)s :: ARLChecker :: {VERSION} :: %(levelname)s :: %(message)s', datefmt='%Y-%m-%d %H:%M:%S', level=logging.INFO, - filename=latest_file, - filemode='a' + handlers=[ + logging.StreamHandler(stdout), + logging.FileHandler(latest_file, mode="a") + ] ) logger = logging.getLogger(__name__)