#pragma once
#include <cstdio>
#include <string>
#include <mutex>

class RequestLog {
public:
    void open(const std::string& path);
    void close();
    void log(const std::string& remote, const std::string& method,
             const std::string& url, int status, int duration_ms,
             const std::string& response);
private:
    FILE* fp_ = nullptr;
    std::mutex mutex_;
};
