diff options
| author | liuguopei <liugp11@chinatelecom.cn> | 2020-11-10 09:55:15 +0800 | 
|---|---|---|
| committer | liuguopei <liugp11@chinatelecom.cn> | 2020-11-10 09:55:15 +0800 | 
| commit | 477b4cdaf60bae65a809697465e89197e7c877ea (patch) | |
| tree | a6e4707dcb6dc1ebb658ca52a22741fdbddd8fe7 | |
| parent | f59cc54b7a2742b45cc359a5a0729ee4640aa3fb (diff) | |
| download | telegram-mail-bot-477b4cdaf60bae65a809697465e89197e7c877ea.tar.gz telegram-mail-bot-477b4cdaf60bae65a809697465e89197e7c877ea.tar.bz2 telegram-mail-bot-477b4cdaf60bae65a809697465e89197e7c877ea.zip | |
logging stdout
| -rw-r--r-- | bot.py | 5 | 
1 files changed, 3 insertions, 2 deletions
| @@ -1,13 +1,14 @@  import logging  import os +import sys  from telegram import ParseMode, Update  from telegram.constants import MAX_MESSAGE_LENGTH  from telegram.ext import (Updater, CommandHandler, CallbackContext)  from utils.client import EmailClient -logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s:%(lineno)d' -                           ' - %(message)s', filename='/var/log/mailbot.log', +logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s:%(lineno)d - %(message)s', +                    stream=sys.stdout,                      level=logging.INFO)  logger = logging.getLogger(__name__) | 
