#pragma once

#include "ChannelHandler.h"

class LoggingHandler : public ChannelHandler {
public:
    void handle(const std::shared_ptr<WebsocketSession>& session, const Message& msg) override {
        spdlog::info("[LoggingHandler] Received message: cmd={}, code={}, message={}",
            msg.cmd, msg.code, msg.message);
    }

    void channelInactive(const std::shared_ptr<WebsocketSession>& session) override {
        spdlog::info("[LoggingHandler] Connection closed.");
    }
};
