different kind of logging

This commit is contained in:
Tomáš Mládek 2018-01-31 15:58:56 +01:00 committed by Tomáš Mládek
parent 5cef333c4a
commit 71aa900a85
2 changed files with 5 additions and 2 deletions

View file

@ -16,8 +16,7 @@ DIR = os.path.dirname(os.path.realpath(__file__))
TMP_DIR = '/tmp' TMP_DIR = '/tmp'
OUT_DIR = DIR + '/out' OUT_DIR = DIR + '/out'
logging.basicConfig(filename=OUT_DIR + '/delojza.log', logging.basicConfig(level=logging.INFO,
level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger("kunsax") logger = logging.getLogger("kunsax")

4
robot.sh Normal file
View file

@ -0,0 +1,4 @@
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd ${DIR}
python3 robot.py 2>&1 |tee -a out/delojza.log