from aiogram.dispatcher.middlewares import BaseMiddleware
import logging

class LoggingMiddleware(BaseMiddleware):
    async def on_process_message(self, message, data):
        logging.info(f"Received message from {message.from_user.id}: {message.text}")
