v1.5 - Python script appends current log
This commit is contained in:
parent
f0fbf9b775
commit
965c90def3
1 changed files with 5 additions and 3 deletions
|
@ -3,7 +3,7 @@ from pathlib import Path
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from requests import Session
|
from requests import Session
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
from sys import argv
|
from sys import argv, stdout
|
||||||
from colorama import Fore, init
|
from colorama import Fore, init
|
||||||
from telegram import Update
|
from telegram import Update
|
||||||
from telegram.ext import ApplicationBuilder, ContextTypes, CommandHandler
|
from telegram.ext import ApplicationBuilder, ContextTypes, CommandHandler
|
||||||
|
@ -26,8 +26,10 @@ logging.basicConfig(
|
||||||
format=f'%(asctime)s :: ARLChecker :: {VERSION} :: %(levelname)s :: %(message)s',
|
format=f'%(asctime)s :: ARLChecker :: {VERSION} :: %(levelname)s :: %(message)s',
|
||||||
datefmt='%Y-%m-%d %H:%M:%S',
|
datefmt='%Y-%m-%d %H:%M:%S',
|
||||||
level=logging.INFO,
|
level=logging.INFO,
|
||||||
filename=latest_file,
|
handlers=[
|
||||||
filemode='a'
|
logging.StreamHandler(stdout),
|
||||||
|
logging.FileHandler(latest_file, mode="a")
|
||||||
|
]
|
||||||
)
|
)
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue