From 5cef333c4a27c629d0f7f0b4b6dfea6451e5022f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Wed, 31 Jan 2018 14:56:29 +0100 Subject: [PATCH] log to file pls --- robot.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/robot.py b/robot.py index dc8fe38..3dadd9d 100755 --- a/robot.py +++ b/robot.py @@ -12,14 +12,15 @@ import youtube_dl from telegram import MessageEntity from telegram.ext import Updater, CommandHandler, MessageHandler, Filters -logging.basicConfig(level=logging.INFO, - format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') -logger = logging.getLogger("kunsax") - 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, + format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') +logger = logging.getLogger("kunsax") + def ytdl_has(url): ies = youtube_dl.extractor.gen_extractors()