aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-09-15 10:15:24 +0200
committerStefan Boberg <[email protected]>2021-09-15 10:15:24 +0200
commit6a5d207920f030e54710af12463f4a701c09b118 (patch)
treef4a652fbd8e5670044e75794e85bfb8c85b09aa0
parentChanged so more loggers go via the zen::loggers interface (diff)
downloadzen-6a5d207920f030e54710af12463f4a701c09b118.tar.xz
zen-6a5d207920f030e54710af12463f4a701c09b118.zip
Changed direct includes of spdlog/spdlog.h into zencore/logging.h to make it easier to tweak implementation
-rw-r--r--zen/chunk/chunk.cpp2
-rw-r--r--zen/cmds/cache.cpp2
-rw-r--r--zen/cmds/copy.cpp3
-rw-r--r--zen/cmds/dedup.cpp2
-rw-r--r--zen/cmds/deploy.cpp3
-rw-r--r--zen/cmds/hash.cpp2
-rw-r--r--zen/cmds/run.cpp2
-rw-r--r--zen/cmds/status.cpp2
-rw-r--r--zen/cmds/top.cpp2
-rw-r--r--zen/cmds/up.cpp2
-rw-r--r--zen/internalfile.cpp3
-rw-r--r--zen/zen.cpp2
-rw-r--r--zencore/filesystem.cpp3
-rw-r--r--zencore/iobuffer.cpp2
-rw-r--r--zenserver-test/projectclient.cpp2
-rw-r--r--zenserver-test/zenserver-test.cpp3
-rw-r--r--zenserver/cache/cachestore.cpp2
-rw-r--r--zenserver/cache/structuredcache.cpp2
-rw-r--r--zenserver/cache/structuredcachestore.cpp2
-rw-r--r--zenserver/casstore.cpp2
-rw-r--r--zenserver/config.cpp6
-rw-r--r--zenserver/experimental/usnjournal.cpp3
-rw-r--r--zenserver/projectstore.cpp2
-rw-r--r--zenserver/projectstore.h2
-rw-r--r--zenserver/sos/sos.cpp5
-rw-r--r--zenserver/sos/sos.h2
-rw-r--r--zenserver/testing/httptest.h3
-rw-r--r--zenserver/testing/launch.h2
-rw-r--r--zenserver/upstream/jupiter.h3
-rw-r--r--zenserver/vfs.cpp2
-rw-r--r--zenserver/zenserver.cpp4
-rw-r--r--zenstore/CAS.cpp3
-rw-r--r--zenstore/caslog.cpp2
-rw-r--r--zenstore/cidstore.cpp2
-rw-r--r--zenstore/filecas.cpp2
-rw-r--r--zenutil/include/zenserverprocess.h2
-rw-r--r--zenutil/zenserverprocess.cpp2
37 files changed, 42 insertions, 50 deletions
diff --git a/zen/chunk/chunk.cpp b/zen/chunk/chunk.cpp
index bc1b17d2f..fbe949a17 100644
--- a/zen/chunk/chunk.cpp
+++ b/zen/chunk/chunk.cpp
@@ -13,12 +13,12 @@
#include <zencore/string.h>
#include <zencore/thread.h>
#include <zencore/timer.h>
+#include <zencore/logging.h>
#include <zenstore/cas.h>
#include "../internalfile.h"
#include <lz4.h>
-#include <spdlog/spdlog.h>
#include <zstd.h>
#include <ppl.h>
diff --git a/zen/cmds/cache.cpp b/zen/cmds/cache.cpp
index 3f4a4cdc3..aaf67e416 100644
--- a/zen/cmds/cache.cpp
+++ b/zen/cmds/cache.cpp
@@ -3,10 +3,10 @@
#include "cache.h"
#include <zencore/filesystem.h>
+#include <zencore/logging.h>
#include <zenhttp/httpcommon.h>
#include <zenserverprocess.h>
-#include <spdlog/spdlog.h>
#include <memory>
// cpr ////////////////////////////////////////////////////////////////////
diff --git a/zen/cmds/copy.cpp b/zen/cmds/copy.cpp
index 571a9e092..22d74511c 100644
--- a/zen/cmds/copy.cpp
+++ b/zen/cmds/copy.cpp
@@ -4,10 +4,9 @@
#include <zencore/filesystem.h>
#include <zencore/string.h>
+#include <zencore/logging.h>
#include <zencore/timer.h>
-#include <spdlog/spdlog.h>
-
CopyCommand::CopyCommand()
{
m_Options.add_options()("h,help", "Print help");
diff --git a/zen/cmds/dedup.cpp b/zen/cmds/dedup.cpp
index 0684da30c..60ee5ef02 100644
--- a/zen/cmds/dedup.cpp
+++ b/zen/cmds/dedup.cpp
@@ -8,9 +8,9 @@
#include <zencore/string.h>
#include <zencore/thread.h>
#include <zencore/timer.h>
+#include <zencore/logging.h>
#include <ppl.h>
-#include <spdlog/spdlog.h>
DedupCommand::DedupCommand()
{
diff --git a/zen/cmds/deploy.cpp b/zen/cmds/deploy.cpp
index 3e5b77c20..b6ff53cf7 100644
--- a/zen/cmds/deploy.cpp
+++ b/zen/cmds/deploy.cpp
@@ -3,8 +3,7 @@
#include "deploy.h"
#include <zencore/string.h>
-
-#include <spdlog/spdlog.h>
+#include <zencore/logging.h>
DeployCommand::DeployCommand()
{
diff --git a/zen/cmds/hash.cpp b/zen/cmds/hash.cpp
index 45506ebee..420496cbd 100644
--- a/zen/cmds/hash.cpp
+++ b/zen/cmds/hash.cpp
@@ -5,9 +5,9 @@
#include <zencore/blake3.h>
#include <zencore/string.h>
#include <zencore/timer.h>
+#include <zencore/logging.h>
#include <ppl.h>
-#include <spdlog/spdlog.h>
HashCommand::HashCommand()
{
diff --git a/zen/cmds/run.cpp b/zen/cmds/run.cpp
index 3427a6efc..3e6e91a39 100644
--- a/zen/cmds/run.cpp
+++ b/zen/cmds/run.cpp
@@ -12,8 +12,8 @@
#include <zencore/string.h>
#include <zencore/timer.h>
#include <zenserverprocess.h>
+#include <zencore/logging.h>
-#include <spdlog/spdlog.h>
#include <filesystem>
// cpr ////////////////////////////////////////////////////////////////////
diff --git a/zen/cmds/status.cpp b/zen/cmds/status.cpp
index b55c08101..6741ab9e9 100644
--- a/zen/cmds/status.cpp
+++ b/zen/cmds/status.cpp
@@ -2,7 +2,7 @@
#include "status.h"
-#include <spdlog/spdlog.h>
+#include <zencore/logging.h>
#include <memory>
StatusCommand::StatusCommand()
diff --git a/zen/cmds/top.cpp b/zen/cmds/top.cpp
index 2ec7db66a..00b973513 100644
--- a/zen/cmds/top.cpp
+++ b/zen/cmds/top.cpp
@@ -3,8 +3,8 @@
#include "top.h"
#include <zenserverprocess.h>
+#include <zencore/logging.h>
-#include <spdlog/spdlog.h>
#include <memory>
//////////////////////////////////////////////////////////////////////////
diff --git a/zen/cmds/up.cpp b/zen/cmds/up.cpp
index ff5fc3e3b..f210f5cfb 100644
--- a/zen/cmds/up.cpp
+++ b/zen/cmds/up.cpp
@@ -4,8 +4,8 @@
#include <zencore/filesystem.h>
#include <zenserverprocess.h>
+#include <zencore/logging.h>
-#include <spdlog/spdlog.h>
#include <memory>
UpCommand::UpCommand()
diff --git a/zen/internalfile.cpp b/zen/internalfile.cpp
index b88ec51dc..75291ecc1 100644
--- a/zen/internalfile.cpp
+++ b/zen/internalfile.cpp
@@ -5,8 +5,7 @@
#include <zencore/filesystem.h>
#include <zencore/fmtutils.h>
#include <zencore/windows.h>
-
-#include <spdlog/spdlog.h>
+#include <zencore/logging.h>
#include <gsl/gsl-lite.hpp>
diff --git a/zen/zen.cpp b/zen/zen.cpp
index 67ff50105..4b8d3adc1 100644
--- a/zen/zen.cpp
+++ b/zen/zen.cpp
@@ -18,6 +18,7 @@
#include "cmds/top.h"
#include "cmds/up.h"
+#include <zencore/logging.h>
#include <zencore/scopeguard.h>
#include <zencore/string.h>
#include <zenstore/cas.h>
@@ -35,7 +36,6 @@
# pragma comment(lib, "userenv.lib")
#endif
-#include <spdlog/spdlog.h>
#include <gsl/gsl-lite.hpp>
#include <mimalloc-new-delete.h>
diff --git a/zencore/filesystem.cpp b/zencore/filesystem.cpp
index 09c2e7386..e03c3aa37 100644
--- a/zencore/filesystem.cpp
+++ b/zencore/filesystem.cpp
@@ -4,6 +4,7 @@
#include <zencore/except.h>
#include <zencore/fmtutils.h>
+#include <zencore/logging.h>
#include <zencore/iobuffer.h>
#include <zencore/string.h>
#include <zencore/windows.h>
@@ -14,8 +15,6 @@
#include <winnt.h>
#include <filesystem>
-#include <spdlog/spdlog.h>
-
#include <gsl/gsl-lite.hpp>
namespace zen {
diff --git a/zencore/iobuffer.cpp b/zencore/iobuffer.cpp
index 9c7781663..10d43498c 100644
--- a/zencore/iobuffer.cpp
+++ b/zencore/iobuffer.cpp
@@ -6,12 +6,12 @@
#include <memory.h>
#include <zencore/filesystem.h>
#include <zencore/fmtutils.h>
+#include <zencore/logging.h>
#include <zencore/memory.h>
#include <zencore/thread.h>
#include <system_error>
#include <atlfile.h>
-#include <spdlog/spdlog.h>
#include <gsl/gsl-lite.hpp>
namespace zen {
diff --git a/zenserver-test/projectclient.cpp b/zenserver-test/projectclient.cpp
index 14d7140ec..11724a9d6 100644
--- a/zenserver-test/projectclient.cpp
+++ b/zenserver-test/projectclient.cpp
@@ -6,8 +6,8 @@
#include <zencore/sharedbuffer.h>
#include <zencore/string.h>
#include <zencore/zencore.h>
+#include <zencore/logging.h>
-#include <spdlog/spdlog.h>
#include <asio.hpp>
#include <gsl/gsl-lite.hpp>
diff --git a/zenserver-test/zenserver-test.cpp b/zenserver-test/zenserver-test.cpp
index efcbf5da8..8b56c406a 100644
--- a/zenserver-test/zenserver-test.cpp
+++ b/zenserver-test/zenserver-test.cpp
@@ -10,6 +10,7 @@
#include <zencore/filesystem.h>
#include <zencore/fmtutils.h>
#include <zencore/iohash.h>
+#include <zencore/logging.h>
#include <zencore/string.h>
#include <zencore/thread.h>
#include <zencore/timer.h>
@@ -26,8 +27,6 @@
#endif
#include <cpr/cpr.h>
-#include <spdlog/spdlog.h>
-
#include <ppl.h>
#include <atomic>
#include <filesystem>
diff --git a/zenserver/cache/cachestore.cpp b/zenserver/cache/cachestore.cpp
index 9180835d9..44aa4c892 100644
--- a/zenserver/cache/cachestore.cpp
+++ b/zenserver/cache/cachestore.cpp
@@ -4,6 +4,7 @@
#include <zencore/crc32.h>
#include <zencore/except.h>
+#include <zencore/logging.h>
#include <zencore/windows.h>
#include <zencore/filesystem.h>
@@ -16,7 +17,6 @@
#include <zenstore/caslog.h>
#include <fmt/core.h>
-#include <spdlog/spdlog.h>
#include <concepts>
#include <filesystem>
#include <gsl/gsl-lite.hpp>
diff --git a/zenserver/cache/structuredcache.cpp b/zenserver/cache/structuredcache.cpp
index 3fbdfb30e..196a4b66c 100644
--- a/zenserver/cache/structuredcache.cpp
+++ b/zenserver/cache/structuredcache.cpp
@@ -37,7 +37,7 @@ HttpStructuredCacheService::HttpStructuredCacheService(::ZenCacheStore& InC
, m_CidStore(InCidStore)
, m_UpstreamCache(std::move(UpstreamCache))
{
- //m_Log.set_level(spdlog::level::debug);
+ // m_Log.set_level(spdlog::level::debug);
}
HttpStructuredCacheService::~HttpStructuredCacheService()
diff --git a/zenserver/cache/structuredcachestore.cpp b/zenserver/cache/structuredcachestore.cpp
index a07fccf98..8c4bb65bb 100644
--- a/zenserver/cache/structuredcachestore.cpp
+++ b/zenserver/cache/structuredcachestore.cpp
@@ -9,6 +9,7 @@
#include <zencore/filesystem.h>
#include <zencore/fmtutils.h>
#include <zencore/iobuffer.h>
+#include <zencore/logging.h>
#include <zencore/string.h>
#include <zencore/thread.h>
#include <zenstore/basicfile.h>
@@ -16,7 +17,6 @@
#include <zenstore/caslog.h>
#include <fmt/core.h>
-#include <spdlog/spdlog.h>
#include <concepts>
#include <filesystem>
#include <gsl/gsl-lite.hpp>
diff --git a/zenserver/casstore.cpp b/zenserver/casstore.cpp
index 6f1e4873b..194edf4a1 100644
--- a/zenserver/casstore.cpp
+++ b/zenserver/casstore.cpp
@@ -3,8 +3,8 @@
#include "casstore.h"
#include <zencore/streamutil.h>
+#include <zencore/logging.h>
-#include <spdlog/spdlog.h>
#include <gsl/gsl-lite.hpp>
namespace zen {
diff --git a/zenserver/config.cpp b/zenserver/config.cpp
index abd69be25..49e7017a9 100644
--- a/zenserver/config.cpp
+++ b/zenserver/config.cpp
@@ -14,7 +14,7 @@
#pragma warning(pop)
#include <fmt/format.h>
-#include <spdlog/spdlog.h>
+#include <zencore/logging.h>
#include <sol/sol.hpp>
#if ZEN_PLATFORM_WINDOWS
@@ -59,7 +59,9 @@ void
ParseGlobalCliOptions(int argc, char* argv[], ZenServerOptions& GlobalOptions, ZenServiceConfig& ServiceConfig)
{
cxxopts::Options options("zenserver", "Zen Server");
- options.add_options()("dedicated", "Enable dedicated server mode", cxxopts::value<bool>(GlobalOptions.IsDedicated)->default_value("false"));
+ options.add_options()("dedicated",
+ "Enable dedicated server mode",
+ cxxopts::value<bool>(GlobalOptions.IsDedicated)->default_value("false"));
options.add_options()("d, debug", "Enable debugging", cxxopts::value<bool>(GlobalOptions.IsDebug)->default_value("false"));
options.add_options()("help", "Show command line help");
options.add_options()("t, test", "Enable test mode", cxxopts::value<bool>(GlobalOptions.IsTest)->default_value("false"));
diff --git a/zenserver/experimental/usnjournal.cpp b/zenserver/experimental/usnjournal.cpp
index 0553945dd..b23794b42 100644
--- a/zenserver/experimental/usnjournal.cpp
+++ b/zenserver/experimental/usnjournal.cpp
@@ -5,8 +5,7 @@
#include <zencore/except.h>
#include <zencore/timer.h>
#include <zencore/zencore.h>
-
-#include <spdlog/spdlog.h>
+#include <zencore/logging.h>
#include <atlfile.h>
diff --git a/zenserver/projectstore.cpp b/zenserver/projectstore.cpp
index de1d90ef9..824dab090 100644
--- a/zenserver/projectstore.cpp
+++ b/zenserver/projectstore.cpp
@@ -788,7 +788,7 @@ ProjectStore::ProjectStore(CasStore& Store, std::filesystem::path BasePath)
, m_CasStore(Store)
{
m_Log.info("initializing project store at '{}'", BasePath);
- //m_Log.set_level(spdlog::level::debug);
+ // m_Log.set_level(spdlog::level::debug);
}
ProjectStore::~ProjectStore()
diff --git a/zenserver/projectstore.h b/zenserver/projectstore.h
index 3068c61b4..c632264d0 100644
--- a/zenserver/projectstore.h
+++ b/zenserver/projectstore.h
@@ -8,8 +8,8 @@
#include <zenstore/cas.h>
#include <zenstore/caslog.h>
-#include <spdlog/spdlog.h>
#include <tsl/robin_map.h>
+#include <zencore/logging.h>
#include <filesystem>
#include <map>
#include <optional>
diff --git a/zenserver/sos/sos.cpp b/zenserver/sos/sos.cpp
index ce0a8f6b1..5fa6ffaae 100644
--- a/zenserver/sos/sos.cpp
+++ b/zenserver/sos/sos.cpp
@@ -6,8 +6,7 @@
namespace zen {
-HttpCommonStructuredObjectStore::HttpCommonStructuredObjectStore()
-: m_Log(logging::Get("sos"))
+HttpCommonStructuredObjectStore::HttpCommonStructuredObjectStore() : m_Log(logging::Get("sos"))
{
m_Router.AddPattern("ns", "([[:alnum:]_-.]+)");
m_Router.AddPattern("bucket", "([[:alnum:]_-.]+)");
@@ -30,4 +29,4 @@ HttpCommonStructuredObjectStore::HandleRequest(zen::HttpServerRequest& HttpServi
ZEN_UNUSED(HttpServiceRequest);
}
-}
+} // namespace zen
diff --git a/zenserver/sos/sos.h b/zenserver/sos/sos.h
index 6e6a5f26a..e602df8c4 100644
--- a/zenserver/sos/sos.h
+++ b/zenserver/sos/sos.h
@@ -31,4 +31,4 @@ private:
zen::HttpRequestRouter m_Router;
};
-}
+} // namespace zen
diff --git a/zenserver/testing/httptest.h b/zenserver/testing/httptest.h
index 5809d4e2e..e174faf62 100644
--- a/zenserver/testing/httptest.h
+++ b/zenserver/testing/httptest.h
@@ -3,8 +3,7 @@
#pragma once
#include <zenhttp/httpserver.h>
-
-#include <spdlog/spdlog.h>
+#include <zencore/logging.h>
namespace zen {
diff --git a/zenserver/testing/launch.h b/zenserver/testing/launch.h
index 001615499..f38e62192 100644
--- a/zenserver/testing/launch.h
+++ b/zenserver/testing/launch.h
@@ -3,8 +3,8 @@
#pragma once
#include <zenhttp/httpserver.h>
+#include <zencore/logging.h>
-#include <spdlog/spdlog.h>
#include <filesystem>
namespace zen {
diff --git a/zenserver/upstream/jupiter.h b/zenserver/upstream/jupiter.h
index 9f36704fa..5efe52b77 100644
--- a/zenserver/upstream/jupiter.h
+++ b/zenserver/upstream/jupiter.h
@@ -5,8 +5,7 @@
#include <zencore/refcount.h>
#include <zencore/thread.h>
#include <zenhttp/httpserver.h>
-
-#include <spdlog/spdlog.h>
+#include <zencore/logging.h>
#include <atomic>
#include <list>
diff --git a/zenserver/vfs.cpp b/zenserver/vfs.cpp
index 18d8f1842..d9795a6a1 100644
--- a/zenserver/vfs.cpp
+++ b/zenserver/vfs.cpp
@@ -8,13 +8,13 @@
# include <zencore/snapshot_manifest.h>
# include <zencore/stream.h>
# include <zencore/windows.h>
+# include <zencore/logging.h>
# include <zenstore/CAS.h>
# include <map>
# include <atlfile.h>
# include <projectedfslib.h>
-# include <spdlog/spdlog.h>
# pragma comment(lib, "projectedfslib.lib")
diff --git a/zenserver/zenserver.cpp b/zenserver/zenserver.cpp
index 2545ed7a2..f1a3ca05f 100644
--- a/zenserver/zenserver.cpp
+++ b/zenserver/zenserver.cpp
@@ -3,6 +3,7 @@
#include <zencore/filesystem.h>
#include <zencore/fmtutils.h>
#include <zencore/iobuffer.h>
+#include <zencore/logging.h>
#include <zencore/refcount.h>
#include <zencore/scopeguard.h>
#include <zencore/string.h>
@@ -17,7 +18,6 @@
#include <fmt/format.h>
#include <mimalloc-new-delete.h>
#include <mimalloc.h>
-#include <spdlog/spdlog.h>
#include <asio.hpp>
#include <exception>
#include <list>
@@ -361,7 +361,7 @@ public:
private:
bool m_IsDedicatedMode = false;
- bool m_TestMode = false;
+ bool m_TestMode = false;
std::filesystem::path m_DataRoot;
std::jthread m_IoRunner;
asio::io_context m_IoContext;
diff --git a/zenstore/CAS.cpp b/zenstore/CAS.cpp
index c05e3703d..10a17d89a 100644
--- a/zenstore/CAS.cpp
+++ b/zenstore/CAS.cpp
@@ -12,8 +12,7 @@
#include <zencore/string.h>
#include <zencore/thread.h>
#include <zencore/uid.h>
-
-#include <spdlog/spdlog.h>
+#include <zencore/logging.h>
#include <gsl/gsl-lite.hpp>
diff --git a/zenstore/caslog.cpp b/zenstore/caslog.cpp
index 169629053..39135f537 100644
--- a/zenstore/caslog.cpp
+++ b/zenstore/caslog.cpp
@@ -11,10 +11,10 @@
#include <zencore/string.h>
#include <zencore/thread.h>
#include <zencore/uid.h>
+#include <zencore/logging.h>
#include <xxhash.h>
-#include <spdlog/spdlog.h>
#include <gsl/gsl-lite.hpp>
#include <functional>
diff --git a/zenstore/cidstore.cpp b/zenstore/cidstore.cpp
index 391520599..5a9ed9483 100644
--- a/zenstore/cidstore.cpp
+++ b/zenstore/cidstore.cpp
@@ -6,8 +6,8 @@
#include <zencore/filesystem.h>
#include <zenstore/CAS.h>
#include <zenstore/caslog.h>
+#include <zencore/logging.h>
-#include <spdlog/spdlog.h>
#include <filesystem>
namespace zen {
diff --git a/zenstore/filecas.cpp b/zenstore/filecas.cpp
index 56d25e729..df42de412 100644
--- a/zenstore/filecas.cpp
+++ b/zenstore/filecas.cpp
@@ -9,8 +9,8 @@
#include <zencore/string.h>
#include <zencore/thread.h>
#include <zencore/uid.h>
+#include <zencore/logging.h>
-#include <spdlog/spdlog.h>
#include <gsl/gsl-lite.hpp>
#include <filesystem>
diff --git a/zenutil/include/zenserverprocess.h b/zenutil/include/zenserverprocess.h
index f7d911a87..9d524b65a 100644
--- a/zenutil/include/zenserverprocess.h
+++ b/zenutil/include/zenserverprocess.h
@@ -4,8 +4,8 @@
#include <zencore/enumflags.h>
#include <zencore/thread.h>
+#include <zencore/logging.h>
-#include <spdlog/spdlog.h>
#include <gsl/gsl-lite.hpp>
#include <atomic>
diff --git a/zenutil/zenserverprocess.cpp b/zenutil/zenserverprocess.cpp
index 093f18f6a..c864195c3 100644
--- a/zenutil/zenserverprocess.cpp
+++ b/zenutil/zenserverprocess.cpp
@@ -5,11 +5,11 @@
#include <zencore/except.h>
#include <zencore/filesystem.h>
#include <zencore/fmtutils.h>
+#include <zencore/logging.h>
#include <zencore/string.h>
#include <atlbase.h>
#include <shellapi.h>
-#include <spdlog/spdlog.h>
#include <source_location>
#include <zencore/windows.h>