aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliuguopei <[email protected]>2020-11-10 09:55:15 +0800
committerliuguopei <[email protected]>2020-11-10 09:55:15 +0800
commit477b4cdaf60bae65a809697465e89197e7c877ea (patch)
treea6e4707dcb6dc1ebb658ca52a22741fdbddd8fe7
parentf59cc54b7a2742b45cc359a5a0729ee4640aa3fb (diff)
downloadtelegram-mail-bot-477b4cdaf60bae65a809697465e89197e7c877ea.tar.gz
telegram-mail-bot-477b4cdaf60bae65a809697465e89197e7c877ea.tar.bz2
telegram-mail-bot-477b4cdaf60bae65a809697465e89197e7c877ea.zip
logging stdout
-rw-r--r--bot.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bot.py b/bot.py
index 13692ab..b562768 100644
--- a/bot.py
+++ b/bot.py
@@ -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__)