aboutsummaryrefslogtreecommitdiff
path: root/zenserver/cache/structuredcachestore.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-09-15 11:27:48 +0200
committerStefan Boberg <[email protected]>2021-09-15 11:27:48 +0200
commit2b9bed6635d95e15847c4d9b602e34d90e277d14 (patch)
tree66fb191150ccbf9f56315a716abd23b25cc1d401 /zenserver/cache/structuredcachestore.cpp
parentxmake: added zenhttp dependency to make zen CLI tool buld (diff)
downloadzen-2b9bed6635d95e15847c4d9b602e34d90e277d14.tar.xz
zen-2b9bed6635d95e15847c4d9b602e34d90e277d14.zip
Changed logging implementation
* Code should no longer directly `#include spdlog/spdlog.h`, instead use `#include <zencore/logging.h>` * Instead of explicit calls to `spdlog::info(...)` and such please use the logging macros defined in `zencore/logging.h`. I.e `ZEN_INFO`, `ZEN_DEBUG`, `ZEN_TRACE`, `ZEN_ERROR`, `ZEN_CRITITCAL` * The macros will pick up the "most local" logger via a `Log()` call to retrieve a logger instance. To override the default logger in a class please implement your own `Log()` function
Diffstat (limited to 'zenserver/cache/structuredcachestore.cpp')
-rw-r--r--zenserver/cache/structuredcachestore.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/zenserver/cache/structuredcachestore.cpp b/zenserver/cache/structuredcachestore.cpp
index 8c4bb65bb..018955e65 100644
--- a/zenserver/cache/structuredcachestore.cpp
+++ b/zenserver/cache/structuredcachestore.cpp
@@ -31,7 +31,7 @@ using namespace fmt::literals;
ZenCacheStore::ZenCacheStore(zen::CasStore& Cas, const std::filesystem::path& RootDir) : m_DiskLayer{Cas, RootDir}
{
- spdlog::info("initializing structured cache at '{}'", RootDir);
+ ZEN_INFO("initializing structured cache at '{}'", RootDir);
zen::CreateDirectories(RootDir);
}
@@ -85,7 +85,7 @@ ZenCacheStore::Put(std::string_view InBucket, const zen::IoHash& HashKey, const
bool
ZenCacheStore::DropBucket(std::string_view Bucket)
{
- spdlog::info("dropping bucket '{}'", Bucket);
+ ZEN_INFO("dropping bucket '{}'", Bucket);
// TODO: should ensure this is done atomically across all layers
@@ -93,7 +93,7 @@ ZenCacheStore::DropBucket(std::string_view Bucket)
const bool DiskDropped = m_DiskLayer.DropBucket(Bucket);
const bool AnyDropped = MemDropped || DiskDropped;
- spdlog::info("bucket '{}' was {}", Bucket, AnyDropped ? "dropped" : "not found");
+ ZEN_INFO("bucket '{}' was {}", Bucket, AnyDropped ? "dropped" : "not found");
return AnyDropped;
}