Skip to content

Commit 92b9f3a

Browse files
Merge pull request #198 from hockeygoalie35/dev
ARLChecker v1.5
2 parents eee29c3 + 5cd55b8 commit 92b9f3a

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

lidarr/ARLChecker

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/with-contenv bash
22
### Default values
3-
scriptVersion="1.4"
3+
scriptVersion="1.5"
44
scriptName="ARLChecker"
55
sleepInterval='24h'
66
### Import Settings

lidarr/python/ARLChecker.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from dataclasses import dataclass
44
from requests import Session
55
from argparse import ArgumentParser
6-
from sys import argv
6+
from sys import argv, stdout
77
from colorama import Fore, init
88
from telegram import Update
99
from telegram.ext import ApplicationBuilder, ContextTypes, CommandHandler
@@ -17,12 +17,19 @@
1717
if 'scriptVersion' in line:
1818
VERSION = re.search(r'"([A-Za-z0-9_\./\\-]*)"', line)[0].replace('"','')
1919

20+
# Get current log file
21+
path = '/config/logs'
22+
latest_file = max([os.path.join(path, f) for f in os.listdir(path) if 'ARLChecker' in f],key=os.path.getctime)
2023

2124
# Logging Setup
2225
logging.basicConfig(
2326
format=f'%(asctime)s :: ARLChecker :: {VERSION} :: %(levelname)s :: %(message)s',
2427
datefmt='%Y-%m-%d %H:%M:%S',
25-
level=logging.INFO
28+
level=logging.INFO,
29+
handlers=[
30+
logging.StreamHandler(stdout),
31+
logging.FileHandler(latest_file, mode="a")
32+
]
2633
)
2734
logger = logging.getLogger(__name__)
2835

0 commit comments

Comments
 (0)