diff options
| author | Dan Engelbrecht <[email protected]> | 2023-09-08 09:47:35 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-09-08 15:47:35 +0200 |
| commit | f2aab0df9fc96162e603eaa50922369de81a0447 (patch) | |
| tree | c5759c21832537b02838951566f9cbda4f6b99b2 /src/zenhttp/include | |
| parent | multithread file realization in oplog-mirror (#388) (diff) | |
| download | zen-f2aab0df9fc96162e603eaa50922369de81a0447.tar.xz zen-f2aab0df9fc96162e603eaa50922369de81a0447.zip | |
add console logging to zen command (#389)
properly set trace log level if IsVerbose
add log category to http client
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; |