summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Kirillov <w96k@runbox.com>2024-10-07 22:39:28 +0400
committerMikhail Kirillov <w96k@runbox.com>2024-10-07 22:39:28 +0400
commit50e04dd95de3dd41a1389712785f583ca60144fe (patch)
treeb57f12d4eec7e48b19c3aa586aa5454b92834981
parentca5a97ee010dcf122b1b39f63800d17571bcf44a (diff)
Add logging
-rw-r--r--app.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/app.py b/app.py
index 6149096..3c754e7 100644
--- a/app.py
+++ b/app.py
@@ -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}')