mirror of
https://github.com/marcogll/vanessa_bot_vanity.git
synced 2026-01-13 13:25:16 +00:00
first commit
This commit is contained in:
12
app/modules/logger.py
Normal file
12
app/modules/logger.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import logging
|
||||
from modules.database import SessionUsersAlma
|
||||
|
||||
def log_request(telegram_id, username, command, message):
|
||||
if not SessionUsersAlma:
|
||||
# DB not configured, just log to console/file
|
||||
logging.info(f"REQ: {command} from {username} ({telegram_id}): {message}")
|
||||
return
|
||||
|
||||
# DB logic removed as models are not available
|
||||
logging.info(f"REQ: {command} from {username} ({telegram_id}): {message}")
|
||||
|
||||
Reference in New Issue
Block a user