different kind of logging

feature-unify_handlers
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'
OUT_DIR = DIR + '/out'
logging.basicConfig(filename=OUT_DIR + '/delojza.log',
level=logging.INFO,
logging.basicConfig(level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
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