diff options
author | Mikhail Kirillov <w96k@runbox.com> | 2024-10-07 22:39:28 +0400 |
---|---|---|
committer | Mikhail Kirillov <w96k@runbox.com> | 2024-10-07 22:39:28 +0400 |
commit | 50e04dd95de3dd41a1389712785f583ca60144fe (patch) | |
tree | b57f12d4eec7e48b19c3aa586aa5454b92834981 | |
parent | ca5a97ee010dcf122b1b39f63800d17571bcf44a (diff) |
Add logging
-rw-r--r-- | app.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -13,9 +13,15 @@ from telegram import Update from telegram.ext import ApplicationBuilder, CommandHandler, ContextTypes from dotenv import load_dotenv import os +import logging load_dotenv() +logging.basicConfig( + level=logging.INFO, + format='%(asctime)s - %(name)s - %(levelname)s - %(message)s' +) + async def hello(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: await update.message.reply_text(f'Hello {update.effective_user.first_name}') |