v1.5 - Python script appends current log

This commit is contained in:
hockeygoalie35 2024-02-13 23:06:59 -05:00
parent f0fbf9b775
commit 965c90def3

View file

@ -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__)