diff options
Diffstat (limited to 'src/zenhttp/include')
| -rw-r--r-- | src/zenhttp/include/zenhttp/httpclient.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/zenhttp/include/zenhttp/httpclient.h b/src/zenhttp/include/zenhttp/httpclient.h index 18031b280..2c81f4a23 100644 --- a/src/zenhttp/include/zenhttp/httpclient.h +++ b/src/zenhttp/include/zenhttp/httpclient.h @@ -11,6 +11,10 @@ #include <optional> #include <unordered_map> +namespace spdlog { +class logger; +} // namespace spdlog + namespace zen { class CbPackage; @@ -28,6 +32,7 @@ class CompositeBuffer; struct HttpClientSettings { + std::string LogCategory = "httpclient"; std::chrono::milliseconds ConnectTimeout{3000}; std::chrono::milliseconds Timeout{}; bool AssumeHttp2 = false; @@ -143,9 +148,12 @@ public: return std::make_pair("Accept", MapContentTypeToString(ContentType)); } + spdlog::logger& Logger() { return m_Log; } + private: struct Impl; + spdlog::logger& m_Log; std::string m_BaseUri; std::string m_SessionId; const HttpClientSettings m_ConnectionSettings; |