streamlined logging a little bit more.

This commit is contained in:
2023-12-13 01:36:11 +01:00
parent 6ede613642
commit f806eeb5fb
3 changed files with 5 additions and 1 deletions

0
kill-chrome.sh Executable file → Normal file
View File

2
parser.py Executable file → Normal file
View File

@@ -199,7 +199,7 @@ def main():
set = load_settings()
log = logging.getLogger()
log.setLevel(set['loglevel'])
log_format = logging.Formatter('[dw-parser] %(asctime)s - %(levelname)s: %(message)s')
log_format = logging.Formatter('%(asctime)s - %(levelname)s: %(message)s')
# handler_stdout = logging.StreamHandler(stream="/proc/1/fd/1")
# handler_stdout.setLevel(set['loglevel'])

4
run.sh
View File

@@ -1,12 +1,16 @@
#!/bin/bash
echo "DW Parser Docker Container started!" > /proc/1/fd/1
if ! test -f "/app/conf/crontab"; then
cp "/app/init/crontab" "/app/conf/crontab"
echo "Crontab not found... Initialized..." > /proc/1/fd/1
fi
crontab "/app/conf/crontab"
if ! test -f "/app/conf/conf.json"; then
cp "/app/init/conf.json" "/app/conf/conf.json"
echo "Conf.json not found... Initialized..." > /proc/1/fd/1
fi
cron -f