log to file pls
This commit is contained in:
parent
81a8dcca22
commit
45a4932d79
1 changed files with 5 additions and 4 deletions
9
robot.py
9
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()
|
||||
|
|
Loading…
Reference in a new issue