From 71aa900a85948fb58700ed374d1b77ea5cfa1202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Wed, 31 Jan 2018 15:58:56 +0100 Subject: [PATCH] different kind of logging --- robot.py | 3 +-- robot.sh | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 robot.sh diff --git a/robot.py b/robot.py index 3dadd9d..95971cf 100755 --- a/robot.py +++ b/robot.py @@ -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") diff --git a/robot.sh b/robot.sh new file mode 100644 index 0000000..50452b9 --- /dev/null +++ b/robot.sh @@ -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