diff --git a/src/fdb5/LibFdb5.cc b/src/fdb5/LibFdb5.cc index 450530b56..6bbe46d3e 100644 --- a/src/fdb5/LibFdb5.cc +++ b/src/fdb5/LibFdb5.cc @@ -81,7 +81,7 @@ static unsigned getUserEnvRemoteProtocol() { static unsigned fdbRemoteProtocolVersion = eckit::Resource("fdbRemoteProtocolVersion;$FDB5_REMOTE_PROTOCOL_VERSION", 0); if (fdbRemoteProtocolVersion) { - eckit::Log::debug() << "fdbRemoteProtocolVersion overidde to version: " << fdbRemoteProtocolVersion + LOG_DEBUG_LIB(LibFdb5) << "fdbRemoteProtocolVersion overidde to version: " << fdbRemoteProtocolVersion << std::endl; } return 0; // no version override diff --git a/src/fdb5/api/DistFDB.cc b/src/fdb5/api/DistFDB.cc index c5a423cfd..fbbe524b5 100644 --- a/src/fdb5/api/DistFDB.cc +++ b/src/fdb5/api/DistFDB.cc @@ -74,21 +74,21 @@ void DistFDB::archive(const Key& key, const void* data, size_t length) { std::vector laneIndices; - //Log::debug() << "Number of lanes: " << lanes_.size() << std::endl; - //Log::debug() << "Lane indices: "; - //for (const auto& i : laneIndices) Log::debug() << i << ", "; - //Log::debug() << std::endl; + //LOG_DEBUG_LIB(LibFdb5) << "Number of lanes: " << lanes_.size() << std::endl; + //LOG_DEBUG_LIB(LibFdb5) << "Lane indices: "; + //for (const auto& i : laneIndices) LOG_DEBUG_LIB(LibFdb5) << i << ", "; + //LOG_DEBUG_LIB(LibFdb5) << std::endl; hash_.hashOrder(key.keyDict(), laneIndices); - //Log::debug() << "Number of lanes: " << lanes_.size() << std::endl; - //Log::debug() << "Lane indices: "; - //for (const auto& i : laneIndices) Log::debug() << i << ", "; - //Log::debug() << std::endl; + //LOG_DEBUG_LIB(LibFdb5) << "Number of lanes: " << lanes_.size() << std::endl; + //LOG_DEBUG_LIB(LibFdb5) << "Lane indices: "; + //for (const auto& i : laneIndices) LOG_DEBUG_LIB(LibFdb5) << i << ", "; + //LOG_DEBUG_LIB(LibFdb5) << std::endl; // Given an order supplied by the Rendezvous hash, try the FDB in order until // one works. n.b. Errors are unacceptable once the FDB is dirty. - Log::debug() << "Attempting dist FDB archive" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Attempting dist FDB archive" << std::endl; decltype(laneIndices)::const_iterator it = laneIndices.begin(); decltype(laneIndices)::const_iterator end = laneIndices.end(); @@ -180,7 +180,7 @@ auto DistFDB::queryInternal(const FDBToolRequest& request, const QueryFN& fn) -> ListIterator DistFDB::list(const FDBToolRequest& request) { - Log::debug() << "DistFDB::list() : " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "DistFDB::list() : " << request << std::endl; return queryInternal(request, [](FDB& fdb, const FDBToolRequest& request) { return fdb.list(request); @@ -188,7 +188,7 @@ ListIterator DistFDB::list(const FDBToolRequest& request) { } ListIterator DistFDB::inspect(const metkit::mars::MarsRequest& request) { - Log::debug() << "DistFDB::inspect() : " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "DistFDB::inspect() : " << request << std::endl; return queryInternal(request, [](FDB& fdb, const FDBToolRequest& request) { return fdb.inspect(request.request()); @@ -196,7 +196,7 @@ ListIterator DistFDB::inspect(const metkit::mars::MarsRequest& request) { } DumpIterator DistFDB::dump(const FDBToolRequest& request, bool simple) { - Log::debug() << "DistFDB::dump() : " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "DistFDB::dump() : " << request << std::endl; return queryInternal(request, [simple](FDB& fdb, const FDBToolRequest& request) { return fdb.dump(request, simple); @@ -204,7 +204,7 @@ DumpIterator DistFDB::dump(const FDBToolRequest& request, bool simple) { } StatusIterator DistFDB::status(const FDBToolRequest& request) { - Log::debug() << "DistFDB::status() : " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "DistFDB::status() : " << request << std::endl; return queryInternal(request, [](FDB& fdb, const FDBToolRequest& request) { return fdb.status(request); @@ -212,7 +212,7 @@ StatusIterator DistFDB::status(const FDBToolRequest& request) { } WipeIterator DistFDB::wipe(const FDBToolRequest& request, bool doit, bool porcelain, bool unsafeWipeAll) { - Log::debug() << "DistFDB::wipe() : " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "DistFDB::wipe() : " << request << std::endl; return queryInternal(request, [doit, porcelain, unsafeWipeAll](FDB& fdb, const FDBToolRequest& request) { return fdb.wipe(request, doit, porcelain, unsafeWipeAll); @@ -220,7 +220,7 @@ WipeIterator DistFDB::wipe(const FDBToolRequest& request, bool doit, bool porcel } PurgeIterator DistFDB::purge(const FDBToolRequest& request, bool doit, bool porcelain) { - Log::debug() << "DistFDB::purge() : " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "DistFDB::purge() : " << request << std::endl; return queryInternal(request, [doit, porcelain](FDB& fdb, const FDBToolRequest& request) { return fdb.purge(request, doit, porcelain); @@ -228,7 +228,7 @@ PurgeIterator DistFDB::purge(const FDBToolRequest& request, bool doit, bool porc } StatsIterator DistFDB::stats(const FDBToolRequest &request) { - Log::debug() << "DistFDB::stats() : " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "DistFDB::stats() : " << request << std::endl; return queryInternal(request, [](FDB& fdb, const FDBToolRequest& request) { return fdb.stats(request); @@ -238,7 +238,7 @@ StatsIterator DistFDB::stats(const FDBToolRequest &request) { ControlIterator DistFDB::control(const FDBToolRequest& request, ControlAction action, ControlIdentifiers identifiers) { - Log::debug() << "DistFDB::control() : " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "DistFDB::control() : " << request << std::endl; return queryInternal(request, [action, identifiers](FDB& fdb, const FDBToolRequest& request) { return fdb.control(request, action, identifiers); @@ -247,7 +247,7 @@ ControlIterator DistFDB::control(const FDBToolRequest& request, MoveIterator DistFDB::move(const FDBToolRequest& request, const eckit::URI& dest) { - Log::debug() << "DistFDB::move() : " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "DistFDB::move() : " << request << std::endl; return queryInternal(request, [dest](FDB& fdb, const FDBToolRequest& request) { return fdb.move(request, dest); diff --git a/src/fdb5/api/FDB.cc b/src/fdb5/api/FDB.cc index ad58c4fa4..99f709ba2 100644 --- a/src/fdb5/api/FDB.cc +++ b/src/fdb5/api/FDB.cc @@ -79,7 +79,7 @@ void FDB::archive(const metkit::mars::MarsRequest& request, eckit::DataHandle& h ss << "FDB archive - found unexpected message" << std::endl; ss << " user request:" << std::endl << " " << request << std::endl; ss << " unexpected message:" << std::endl << " " << key << std::endl; - eckit::Log::debug() << ss.str(); + LOG_DEBUG_LIB(LibFdb5) << ss.str(); throw eckit::UserError(ss.str(), Here()); } archive(key, msg.data(), msg.length()); @@ -92,7 +92,7 @@ void FDB::archive(const metkit::mars::MarsRequest& request, eckit::DataHandle& h for (auto vacantRequest : cube.vacantRequests()) { ss << " " << vacantRequest << std::endl; } - eckit::Log::debug() << ss.str(); + LOG_DEBUG_LIB(LibFdb5) << ss.str(); throw eckit::UserError(ss.str(), Here()); } } @@ -136,7 +136,7 @@ bool FDB::sorted(const metkit::mars::MarsRequest &request) { eckit::Log::userInfo() << "Using optimise" << std::endl; } - eckit::Log::debug() << "fdb5::FDB::retrieve() Sorted? " << sorted << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "fdb5::FDB::retrieve() Sorted? " << sorted << std::endl; return sorted; } diff --git a/src/fdb5/api/FDBFactory.cc b/src/fdb5/api/FDBFactory.cc index 4091d4302..6c48026ad 100644 --- a/src/fdb5/api/FDBFactory.cc +++ b/src/fdb5/api/FDBFactory.cc @@ -50,7 +50,7 @@ FDBBase::FDBBase(const Config& config, const std::string& name) : controlIdentifiers_ |= ControlIdentifier::Wipe; } - eckit::Log::debug() << "FDBBase: " << config << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "FDBBase: " << config << std::endl; } @@ -114,7 +114,7 @@ std::unique_ptr FDBFactory::build(const Config& config) { std::string key = actualConfig.getString("type", "local"); - eckit::Log::debug() << "Selecting FDB implementation: " << key << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Selecting FDB implementation: " << key << std::endl; eckit::AutoLock lock(mutex_); @@ -127,7 +127,7 @@ std::unique_ptr FDBFactory::build(const Config& config) { } std::unique_ptr ret = it->second->make(actualConfig); - eckit::Log::debug() << "Constructed FDB implementation: " << *ret << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Constructed FDB implementation: " << *ret << std::endl; return ret; } diff --git a/src/fdb5/api/FDBStats.cc b/src/fdb5/api/FDBStats.cc index 8376eeb68..b1cafc670 100644 --- a/src/fdb5/api/FDBStats.cc +++ b/src/fdb5/api/FDBStats.cc @@ -76,7 +76,7 @@ void FDBStats::addArchive(size_t length, eckit::Timer& timer, size_t nfields) { elapsedArchive_ += elapsed; sumArchiveTimingSquared_ += elapsed * elapsed; - Log::debug() << "Archive count: " << numArchive_ + LOG_DEBUG_LIB(LibFdb5) << "Archive count: " << numArchive_ << ", size: " << Bytes(length) << ", total: " << Bytes(bytesArchive_) << ", time: " << Seconds(elapsed) @@ -97,7 +97,7 @@ void FDBStats::addRetrieve(size_t length, eckit::Timer& timer) { elapsedRetrieve_ += elapsed; sumRetrieveTimingSquared_ += elapsed * elapsed; - Log::debug() << "Retrieve count: " << numRetrieve_ + LOG_DEBUG_LIB(LibFdb5) << "Retrieve count: " << numRetrieve_ << ", size: " << Bytes(length) << ", total: " << Bytes(bytesRetrieve_) << ", time: " << Seconds(elapsed) @@ -113,7 +113,7 @@ void FDBStats::addFlush(eckit::Timer& timer) { elapsedFlush_ += elapsed; sumFlushTimingSquared_ += elapsed * elapsed; - Log::debug() << "Flush count: " << numFlush_ + LOG_DEBUG_LIB(LibFdb5) << "Flush count: " << numFlush_ << ", time: " << elapsed << "s" << ", total: " << elapsedFlush_ << "s" << std::endl; diff --git a/src/fdb5/api/LocalFDB.cc b/src/fdb5/api/LocalFDB.cc index b8644ac33..5627f973e 100644 --- a/src/fdb5/api/LocalFDB.cc +++ b/src/fdb5/api/LocalFDB.cc @@ -48,7 +48,7 @@ namespace fdb5 { void LocalFDB::archive(const Key& key, const void* data, size_t length) { if (!archiver_) { - Log::debug() << *this << ": Constructing new archiver" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << *this << ": Constructing new archiver" << std::endl; archiver_.reset(new Archiver(config_)); } @@ -58,7 +58,7 @@ void LocalFDB::archive(const Key& key, const void* data, size_t length) { ListIterator LocalFDB::inspect(const metkit::mars::MarsRequest &request) { if (!inspector_) { - Log::debug() << *this << ": Constructing new retriever" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << *this << ": Constructing new retriever" << std::endl; inspector_.reset(new Inspector(config_)); } @@ -82,44 +82,44 @@ APIIterator LocalFDB::queryInternal(const FDBTo } ListIterator LocalFDB::list(const FDBToolRequest& request) { - Log::debug() << "LocalFDB::list() : " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "LocalFDB::list() : " << request << std::endl; return queryInternal(request); } DumpIterator LocalFDB::dump(const FDBToolRequest &request, bool simple) { - Log::debug() << "LocalFDB::dump() : " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "LocalFDB::dump() : " << request << std::endl; return queryInternal(request, simple); } StatusIterator LocalFDB::status(const FDBToolRequest &request) { - Log::debug() << "LocalFDB::status() : " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "LocalFDB::status() : " << request << std::endl; return queryInternal(request); } WipeIterator LocalFDB::wipe(const FDBToolRequest &request, bool doit, bool porcelain, bool unsafeWipeAll) { - Log::debug() << "LocalFDB::wipe() : " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "LocalFDB::wipe() : " << request << std::endl; return queryInternal(request, doit, porcelain, unsafeWipeAll); } MoveIterator LocalFDB::move(const FDBToolRequest& request, const eckit::URI& dest) { - Log::debug() << "LocalFDB::move() : " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "LocalFDB::move() : " << request << std::endl; return queryInternal(request, dest); } PurgeIterator LocalFDB::purge(const FDBToolRequest& request, bool doit, bool porcelain) { - Log::debug() << "LocalFDB::purge() : " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "LocalFDB::purge() : " << request << std::endl; return queryInternal(request, doit, porcelain); } StatsIterator LocalFDB::stats(const FDBToolRequest& request) { - Log::debug() << "LocalFDB::stats() : " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "LocalFDB::stats() : " << request << std::endl; return queryInternal(request); } ControlIterator LocalFDB::control(const FDBToolRequest& request, ControlAction action, ControlIdentifiers identifiers) { - Log::debug() << "LocalFDB::control() : " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "LocalFDB::control() : " << request << std::endl; return queryInternal(request, action, identifiers); } diff --git a/src/fdb5/api/RandomFDB.cc b/src/fdb5/api/RandomFDB.cc index a9221d764..69c6946cc 100644 --- a/src/fdb5/api/RandomFDB.cc +++ b/src/fdb5/api/RandomFDB.cc @@ -52,7 +52,7 @@ class RandomFDBBuilder : public FDBBuilderBase { std::random_device rd; int choice = std::uniform_int_distribution(0, fdbConfigs.size()-1)(rd); - Log::debug() << "Constructing random API instance: " << choice+1 + LOG_DEBUG_LIB(LibFdb5) << "Constructing random API instance: " << choice+1 << " / " << fdbConfigs.size() << std::endl; ASSERT(choice >= 0); diff --git a/src/fdb5/api/RemoteFDB.cc b/src/fdb5/api/RemoteFDB.cc index 61bceb8fd..fc595d596 100644 --- a/src/fdb5/api/RemoteFDB.cc +++ b/src/fdb5/api/RemoteFDB.cc @@ -135,7 +135,7 @@ RemoteFDB::RemoteFDB(const eckit::Configuration& config, const std::string& name if (numAliases == 0) { eckit::net::Endpoint storeEndpoint{store}; storesReadMapping_[storeEndpoint] = storeEndpoint; - Log::debug() << "store endpoint: " << storeEndpoint << " default data location endpoint: " << storeEndpoint << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "store endpoint: " << storeEndpoint << " default data location endpoint: " << storeEndpoint << std::endl; } else { for (size_t j=0; j() << "store endpoint: " << alias << " default data location endpoint: " << store << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "store endpoint: " << alias << " default data location endpoint: " << store << std::endl; } } } diff --git a/src/fdb5/api/SelectFDB.cc b/src/fdb5/api/SelectFDB.cc index db81d4a3a..586ee5b19 100644 --- a/src/fdb5/api/SelectFDB.cc +++ b/src/fdb5/api/SelectFDB.cc @@ -138,7 +138,7 @@ auto SelectFDB::queryInternal(const FDBToolRequest& request, const QueryFN& fn) } ListIterator SelectFDB::list(const FDBToolRequest& request) { - Log::debug() << "SelectFDB::list() >> " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "SelectFDB::list() >> " << request << std::endl; return queryInternal(request, [](FDB& fdb, const FDBToolRequest& request) { return fdb.list(request); @@ -146,7 +146,7 @@ ListIterator SelectFDB::list(const FDBToolRequest& request) { } DumpIterator SelectFDB::dump(const FDBToolRequest& request, bool simple) { - Log::debug() << "SelectFDB::dump() >> " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "SelectFDB::dump() >> " << request << std::endl; return queryInternal(request, [simple](FDB& fdb, const FDBToolRequest& request) { return fdb.dump(request, simple); @@ -154,7 +154,7 @@ DumpIterator SelectFDB::dump(const FDBToolRequest& request, bool simple) { } StatusIterator SelectFDB::status(const FDBToolRequest& request) { - Log::debug() << "SelectFDB::status() >> " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "SelectFDB::status() >> " << request << std::endl; return queryInternal(request, [](FDB& fdb, const FDBToolRequest& request) { return fdb.status(request); @@ -162,7 +162,7 @@ StatusIterator SelectFDB::status(const FDBToolRequest& request) { } WipeIterator SelectFDB::wipe(const FDBToolRequest& request, bool doit, bool porcelain, bool unsafeWipeAll) { - Log::debug() << "SelectFDB::wipe() >> " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "SelectFDB::wipe() >> " << request << std::endl; return queryInternal(request, [doit, porcelain, unsafeWipeAll](FDB& fdb, const FDBToolRequest& request) { return fdb.wipe(request, doit, porcelain, unsafeWipeAll); @@ -170,7 +170,7 @@ WipeIterator SelectFDB::wipe(const FDBToolRequest& request, bool doit, bool porc } PurgeIterator SelectFDB::purge(const FDBToolRequest& request, bool doit, bool porcelain) { - Log::debug() << "SelectFDB::purge() >> " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "SelectFDB::purge() >> " << request << std::endl; return queryInternal(request, [doit, porcelain](FDB& fdb, const FDBToolRequest& request) { return fdb.purge(request, doit, porcelain); @@ -178,7 +178,7 @@ PurgeIterator SelectFDB::purge(const FDBToolRequest& request, bool doit, bool po } StatsIterator SelectFDB::stats(const FDBToolRequest &request) { - Log::debug() << "SelectFDB::stats() >> " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "SelectFDB::stats() >> " << request << std::endl; return queryInternal(request, [](FDB& fdb, const FDBToolRequest& request) { return fdb.stats(request); @@ -188,7 +188,7 @@ StatsIterator SelectFDB::stats(const FDBToolRequest &request) { ControlIterator SelectFDB::control(const FDBToolRequest& request, ControlAction action, ControlIdentifiers identifiers) { - Log::debug() << "SelectFDB::control >> " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "SelectFDB::control >> " << request << std::endl; return queryInternal(request, [action, identifiers](FDB& fdb, const FDBToolRequest& request) { return fdb.control(request, action, identifiers); diff --git a/src/fdb5/api/helpers/FDBToolRequest.cc b/src/fdb5/api/helpers/FDBToolRequest.cc index 330178fbb..45762478c 100644 --- a/src/fdb5/api/helpers/FDBToolRequest.cc +++ b/src/fdb5/api/helpers/FDBToolRequest.cc @@ -44,7 +44,7 @@ std::vector FDBToolRequest::requestsFromString(const std::string ASSERT(parsedRequests.size() == 1); for (const auto& r : parsedRequests) { - eckit::Log::debug() << "Parsed request: " << static_cast(r) << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Parsed request: " << static_cast(r) << std::endl; checkMinimumKeys(r, minimumKeys); } @@ -75,7 +75,7 @@ std::vector FDBToolRequest::requestsFromString(const std::string request.unsetValues(param); } }*/ - eckit::Log::debug() << "Expanded request: " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Expanded request: " << request << std::endl; requests.emplace_back(FDBToolRequest(request, false, minimumKeys)); } } diff --git a/src/fdb5/config/Config.cc b/src/fdb5/config/Config.cc index 67b05dec5..7db4124ef 100644 --- a/src/fdb5/config/Config.cc +++ b/src/fdb5/config/Config.cc @@ -68,7 +68,7 @@ Config::Config() : schemaPath_(""), schemaPathInitialised_(false) { } Config Config::make(const eckit::PathName& path, const eckit::Configuration& userConfig) { - eckit::Log::debug() << "Using FDB configuration file: " << path << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Using FDB configuration file: " << path << std::endl; Config cfg{YAMLConfiguration(path)}; cfg.set("configSource", path); cfg.userConfig_ = std::make_shared(userConfig); @@ -213,7 +213,7 @@ void Config::initializeSchemaPath() const { } schemaPathInitialised_ = true; - eckit::Log::debug() << "Using FDB schema: " << schemaPath_ << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Using FDB schema: " << schemaPath_ << std::endl; } PathName Config::configPath() const { diff --git a/src/fdb5/database/AxisRegistry.cc b/src/fdb5/database/AxisRegistry.cc index a79007e5f..c25e965a1 100644 --- a/src/fdb5/database/AxisRegistry.cc +++ b/src/fdb5/database/AxisRegistry.cc @@ -56,7 +56,7 @@ void AxisRegistry::deduplicate(const keyword_t& keyword, std::shared_ptr } else { // dedups++; -// eckit::Log::debug() << dedups << " deduped axis [" << *ptr << "]" << std::endl; +// LOG_DEBUG_LIB(LibFdb5) << dedups << " deduped axis [" << *ptr << "]" << std::endl; ptr = *it; } } diff --git a/src/fdb5/database/BaseArchiveVisitor.cc b/src/fdb5/database/BaseArchiveVisitor.cc index 0ef41086f..9338d35c1 100644 --- a/src/fdb5/database/BaseArchiveVisitor.cc +++ b/src/fdb5/database/BaseArchiveVisitor.cc @@ -26,7 +26,7 @@ BaseArchiveVisitor::BaseArchiveVisitor(Archiver &owner, const Key &dataKey) : } bool BaseArchiveVisitor::selectDatabase(const Key &dbKey, const Key&) { - eckit::Log::debug() << "selectDatabase " << dbKey << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "selectDatabase " << dbKey << std::endl; owner_.selectDatabase(dbKey); ASSERT(owner_.catalogue_); owner_.catalogue_->deselectIndex(); diff --git a/src/fdb5/database/Catalogue.cc b/src/fdb5/database/Catalogue.cc index 6b8e25de5..845c46074 100644 --- a/src/fdb5/database/Catalogue.cc +++ b/src/fdb5/database/Catalogue.cc @@ -91,7 +91,7 @@ std::unique_ptr CatalogueReaderFactory::build(const Key& dbKey, eckit::AutoLock lock(mutex_); auto j = builders_.find(nameLowercase); - eckit::Log::debug() << "Looking for CatalogueReaderBuilder [" << nameLowercase << "]" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Looking for CatalogueReaderBuilder [" << nameLowercase << "]" << std::endl; if (j == builders_.end()) { eckit::Log::error() << "No CatalogueReaderBuilder for [" << nameLowercase << "]" << std::endl; @@ -111,7 +111,7 @@ std::unique_ptr CatalogueReaderFactory::build(const eckit::URI& eckit::AutoLock lock(mutex_); auto j = builders_.find(nameLowercase); - eckit::Log::debug() << "Looking for CatalogueReaderBuilder [" << nameLowercase << "]" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Looking for CatalogueReaderBuilder [" << nameLowercase << "]" << std::endl; if (j == builders_.end()) { eckit::Log::error() << "No CatalogueReaderBuilder for [" << nameLowercase << "]" << std::endl; @@ -185,7 +185,7 @@ std::unique_ptr CatalogueWriterFactory::build(const Key& dbKey, eckit::AutoLock lock(mutex_); auto j = builders_.find(nameLowercase); - eckit::Log::debug() << "Looking for CatalogueWriterBuilder [" << nameLowercase << "]" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Looking for CatalogueWriterBuilder [" << nameLowercase << "]" << std::endl; if (j == builders_.end()) { eckit::Log::error() << "No CatalogueWriterBuilder for [" << nameLowercase << "]" << std::endl; @@ -205,7 +205,7 @@ std::unique_ptr CatalogueWriterFactory::build(const eckit::URI& eckit::AutoLock lock(mutex_); auto j = builders_.find(nameLowercase); - eckit::Log::debug() << "Looking for CatalogueWriterBuilder [" << nameLowercase << "]" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Looking for CatalogueWriterBuilder [" << nameLowercase << "]" << std::endl; if (j == builders_.end()) { eckit::Log::error() << "No CatalogueWriterBuilder for [" << nameLowercase << "]" << std::endl; diff --git a/src/fdb5/database/EntryVisitMechanism.cc b/src/fdb5/database/EntryVisitMechanism.cc index da8ed9ef6..3f02d6c40 100644 --- a/src/fdb5/database/EntryVisitMechanism.cc +++ b/src/fdb5/database/EntryVisitMechanism.cc @@ -99,7 +99,7 @@ void EntryVisitMechanism::visit(const FDBToolRequest& request, EntryVisitor& vis // TODO: Put minimim keys check into FDBToolRequest. - Log::debug() << "REQUEST ====> " << request.request() << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "REQUEST ====> " << request.request() << std::endl; try { @@ -110,7 +110,7 @@ void EntryVisitMechanism::visit(const FDBToolRequest& request, EntryVisitor& vis // And do the visitation for (const URI& uri : uris) { - Log::debug() << "FDB processing URI " << uri << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "FDB processing URI " << uri << std::endl; std::unique_ptr catalogue = CatalogueReaderFactory::instance().build(uri, dbConfig_); ASSERT(catalogue->open()); diff --git a/src/fdb5/database/FieldLocation.cc b/src/fdb5/database/FieldLocation.cc index c626abd15..437fdaac6 100644 --- a/src/fdb5/database/FieldLocation.cc +++ b/src/fdb5/database/FieldLocation.cc @@ -62,7 +62,7 @@ FieldLocation* FieldLocationFactory::build(const std::string& name, const eckit: auto j = builders_.find(name); - eckit::Log::debug() << "Looking for FieldLocationBuilder [" << name << "]" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Looking for FieldLocationBuilder [" << name << "]" << std::endl; if (j == builders_.end()) { eckit::Log::error() << "No FieldLocationBuilder for [" << name << "]" << std::endl; @@ -81,7 +81,7 @@ FieldLocation* FieldLocationFactory::build(const std::string& name, const eckit: auto j = builders_.find(name); - eckit::Log::debug() << "Looking for FieldLocationBuilder [" << name << "]" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Looking for FieldLocationBuilder [" << name << "]" << std::endl; if (j == builders_.end()) { eckit::Log::error() << "No FieldLocationBuilder for [" << name << "]" << std::endl; diff --git a/src/fdb5/database/Index.cc b/src/fdb5/database/Index.cc index 488b0332d..fa458d402 100755 --- a/src/fdb5/database/Index.cc +++ b/src/fdb5/database/Index.cc @@ -128,7 +128,7 @@ void IndexBase::encodeLegacy(eckit::Stream& s, const int version) const { void IndexBase::put(const InspectionKey &key, const Field &field) { - eckit::Log::debug() << "FDB Index " << indexer_ << " " << key << " -> " << field << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "FDB Index " << indexer_ << " " << key << " -> " << field << std::endl; axes_.insert(key); add(key, field); diff --git a/src/fdb5/database/Inspector.cc b/src/fdb5/database/Inspector.cc index 73a5bb5ce..b25f36cab 100644 --- a/src/fdb5/database/Inspector.cc +++ b/src/fdb5/database/Inspector.cc @@ -49,7 +49,7 @@ bool InspectIterator::next(ListElement& elem) { //---------------------------------------------------------------------------------------------------------------------- static void purgeCatalogue(Key& key, CatalogueReader*& db) { - Log::debug() << "Purging DB with key " << key << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Purging DB with key " << key << std::endl; delete db; } @@ -67,7 +67,7 @@ ListIterator Inspector::inspect(const metkit::mars::MarsRequest& request, InspectIterator* iterator = new InspectIterator(); MultiRetrieveVisitor visitor(notifyee, *iterator, databases_, dbConfig_); - Log::debug() << "Using schema: " << schema << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Using schema: " << schema << std::endl; schema.expand(request, visitor); diff --git a/src/fdb5/database/Manager.cc b/src/fdb5/database/Manager.cc index 0998c856c..0a516f76c 100644 --- a/src/fdb5/database/Manager.cc +++ b/src/fdb5/database/Manager.cc @@ -74,7 +74,7 @@ static const EngineTable& readEngineTypes(const eckit::PathName enginesFile) { // Sensible defaults if not configured if(!enginesFile.exists()) { - eckit::Log::debug() << "FDB Engines file not found: assuming Engine 'toc' Regex '.*'" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "FDB Engines file not found: assuming Engine 'toc' Regex '.*'" << std::endl; table.push_back(EngineType("toc", ".*")); return table; } @@ -83,7 +83,7 @@ static const EngineTable& readEngineTypes(const eckit::PathName enginesFile) { std::ifstream in(enginesFile.localPath()); - eckit::Log::debug() << "Loading FDB engines from " << enginesFile << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Loading FDB engines from " << enginesFile << std::endl; if (!in) { eckit::Log::error() << enginesFile << eckit::Log::syserr << std::endl; @@ -280,12 +280,12 @@ std::string Manager::engine(const URI& uri) // { // std::set engines = Manager::engines(key); -// Log::debug() << "Matching engines for key " << key << " -> " << engines << std::endl; +// LOG_DEBUG_LIB(LibFdb5) << "Matching engines for key " << key << " -> " << engines << std::endl; // std::vector r; // union of all locations // for(std::set::const_iterator i = engines.begin(); i != engines.end(); ++i) { -// Log::debug() << "Selected FDB engine " << *i << std::endl; +// LOG_DEBUG_LIB(LibFdb5) << "Selected FDB engine " << *i << std::endl; // std::vector p = Engine::backend(*i).allLocations(key, config_); // r.insert(r.end(), p.begin(), p.end()); // } @@ -298,12 +298,12 @@ std::vector Manager::visitableLocations(const metkit::mars::MarsRequ std::set engines = Manager::engines(rq, all); - Log::debug() << "Matching engines for request " << rq << " -> " << engines << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Matching engines for request " << rq << " -> " << engines << std::endl; std::vector r; // union of all locations for(std::set::const_iterator i = engines.begin(); i != engines.end(); ++i) { - Log::debug() << "Selected FDB engine " << *i << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Selected FDB engine " << *i << std::endl; std::vector p; if (all) { p = Engine::backend(*i).visitableLocations(config_); @@ -321,12 +321,12 @@ std::vector Manager::visitableLocations(const metkit::mars::MarsRequ // std::set engines = Manager::engines(key); -// Log::debug() << "Matching engines for key " << key << " -> " << engines << std::endl; +// LOG_DEBUG_LIB(LibFdb5) << "Matching engines for key " << key << " -> " << engines << std::endl; // std::vector r; // union of all locations // for(std::set::const_iterator i = engines.begin(); i != engines.end(); ++i) { -// Log::debug() << "Selected FDB engine " << *i << std::endl; +// LOG_DEBUG_LIB(LibFdb5) << "Selected FDB engine " << *i << std::endl; // std::vector p = Engine::backend(*i).writableLocations(key, config_); // r.insert(r.end(), p.begin(), p.end()); // } diff --git a/src/fdb5/database/MultiRetrieveVisitor.cc b/src/fdb5/database/MultiRetrieveVisitor.cc index 3dcc88db5..37a299cd4 100644 --- a/src/fdb5/database/MultiRetrieveVisitor.cc +++ b/src/fdb5/database/MultiRetrieveVisitor.cc @@ -44,7 +44,7 @@ MultiRetrieveVisitor::~MultiRetrieveVisitor() { bool MultiRetrieveVisitor::selectDatabase(const Key& key, const Key&) { - eckit::Log::debug() << "FDB5 selectDatabase " << key << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "FDB5 selectDatabase " << key << std::endl; /* is it the current DB ? */ @@ -58,7 +58,7 @@ bool MultiRetrieveVisitor::selectDatabase(const Key& key, const Key&) { /* is the DB already open ? */ if(databases_.exists(key)) { - eckit::Log::debug() << "FDB5 Reusing database " << key << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "FDB5 Reusing database " << key << std::endl; catalogue_ = databases_.access(key); return true; } @@ -75,10 +75,10 @@ bool MultiRetrieveVisitor::selectDatabase(const Key& key, const Key&) { return false; } - eckit::Log::debug() << "selectDatabase opening database " << key << " (type=" << newCatalogue->type() << ")" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "selectDatabase opening database " << key << " (type=" << newCatalogue->type() << ")" << std::endl; if (!newCatalogue->open()) { - eckit::Log::debug() << "Database does not exist " << key << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Database does not exist " << key << std::endl; return false; } else { catalogue_ = newCatalogue.release(); @@ -89,13 +89,13 @@ bool MultiRetrieveVisitor::selectDatabase(const Key& key, const Key&) { bool MultiRetrieveVisitor::selectIndex(const Key& key, const Key&) { ASSERT(catalogue_); - eckit::Log::debug() << "selectIndex " << key << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "selectIndex " << key << std::endl; return catalogue_->selectIndex(key); } bool MultiRetrieveVisitor::selectDatum(const InspectionKey& key, const Key& full) { ASSERT(catalogue_); - eckit::Log::debug() << "selectDatum " << key << ", " << full << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "selectDatum " << key << ", " << full << std::endl; Field field; if (catalogue_->retrieve(key, field)) { diff --git a/src/fdb5/database/Report.cc b/src/fdb5/database/Report.cc index cf3333159..ade021912 100644 --- a/src/fdb5/database/Report.cc +++ b/src/fdb5/database/Report.cc @@ -42,7 +42,7 @@ void Report::append(const dbtype_t& dbtype, DbStats stats) Report& Report::operator+=(const Report& rhs) { - Log::debug() << "Collating reports" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Collating reports" << std::endl; // union of dbtypes @@ -58,7 +58,7 @@ Report& Report::operator+=(const Report& rhs) { // collate DB stats for(std::map::const_iterator i = rhs.dbStats_.begin(); i != rhs.dbStats_.end(); ++i) { - Log::debug() << "dbtype " << i->first << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "dbtype " << i->first << std::endl; std::map::iterator j = dbStats_.find(i->first); if(j != dbStats_.end()) { j->second.add(i->second); @@ -71,7 +71,7 @@ Report& Report::operator+=(const Report& rhs) { // collate Index stats for(std::map::const_iterator i = rhs.indexStats_.begin(); i != rhs.indexStats_.end(); ++i) { - Log::debug() << "dbtype " << i->first << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "dbtype " << i->first << std::endl; std::map::iterator j = indexStats_.find(i->first); if(j != indexStats_.end()) { j->second.add(i->second); @@ -84,7 +84,7 @@ Report& Report::operator+=(const Report& rhs) { // collate Data stats for(std::map::const_iterator i = rhs.dataStats_.begin(); i != rhs.dataStats_.end(); ++i) { - Log::debug() << "dbtype " << i->first << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "dbtype " << i->first << std::endl; std::map::iterator j = dataStats_.find(i->first); if(j != dataStats_.end()) { j->second.add(i->second); diff --git a/src/fdb5/database/RetrieveVisitor.cc b/src/fdb5/database/RetrieveVisitor.cc index 350fd587f..d5b35c316 100644 --- a/src/fdb5/database/RetrieveVisitor.cc +++ b/src/fdb5/database/RetrieveVisitor.cc @@ -42,7 +42,7 @@ bool RetrieveVisitor::selectDatabase(const Key& key, const Key&) { } } - eckit::Log::debug() << "selectDatabase " << key << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "selectDatabase " << key << std::endl; catalogue_ = CatalogueReaderFactory::instance().build(key, fdb5::Config()).get(); // If this database is locked for retrieval then it "does not exist" diff --git a/src/fdb5/database/Store.cc b/src/fdb5/database/Store.cc index 243e57f7b..48d2c0157 100644 --- a/src/fdb5/database/Store.cc +++ b/src/fdb5/database/Store.cc @@ -87,7 +87,7 @@ std::unique_ptr StoreFactory::build(const Key& key, const Config& config) eckit::AutoLock lock(mutex_); auto j = builders_.find(nameLowercase); - eckit::Log::debug() << "Looking for StoreBuilder [" << nameLowercase << "]" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Looking for StoreBuilder [" << nameLowercase << "]" << std::endl; if (j == builders_.end()) { eckit::Log::error() << "No StoreBuilder for [" << nameLowercase << "]" << std::endl; @@ -107,7 +107,7 @@ std::unique_ptr StoreFactory::build(const eckit::URI& uri, const Config& eckit::AutoLock lock(mutex_); auto j = builders_.find(nameLowercase); - eckit::Log::debug() << "Looking for StoreBuilder [" << nameLowercase << "]" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Looking for StoreBuilder [" << nameLowercase << "]" << std::endl; if (j == builders_.end()) { eckit::Log::error() << "No StoreBuilder for [" << nameLowercase << "]" << std::endl; diff --git a/src/fdb5/io/FieldHandle.cc b/src/fdb5/io/FieldHandle.cc index 182b2373b..af1c71ab6 100644 --- a/src/fdb5/io/FieldHandle.cc +++ b/src/fdb5/io/FieldHandle.cc @@ -19,6 +19,7 @@ #include "metkit/mars/MarsRequest.h" #include "metkit/hypercube/HyperCubePayloaded.h" +#include "fdb5/LibFdb5.h" #include "fdb5/io/FieldHandle.h" namespace fdb5 { @@ -184,7 +185,7 @@ long FieldHandle::read(void* buffer, long length) { p += n; } - eckit::Log::debug() << "FieldHandle::read " << (total > 0 ? total : n) << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "FieldHandle::read " << (total > 0 ? total : n) << std::endl; return total > 0 ? total : n; } diff --git a/src/fdb5/io/LustreFileHandle.h b/src/fdb5/io/LustreFileHandle.h index 942122ee5..da1fe77ec 100644 --- a/src/fdb5/io/LustreFileHandle.h +++ b/src/fdb5/io/LustreFileHandle.h @@ -62,7 +62,7 @@ class LustreFileHandle : public HANDLE { /* From the docs: llapi_file_create closes the file descriptor. You must re-open the file afterwards */ - eckit::Log::debug() << "Creating Lustre file " << path + LOG_DEBUG_LIB(LibFdb5) << "Creating Lustre file " << path << " with " << stripe_.count_ << " stripes " << "of " << eckit::Bytes(stripe_.size_) << std::endl; diff --git a/src/fdb5/message/MessageArchiver.cc b/src/fdb5/message/MessageArchiver.cc index 2b46120e8..d6cdfbafd 100644 --- a/src/fdb5/message/MessageArchiver.cc +++ b/src/fdb5/message/MessageArchiver.cc @@ -54,14 +54,14 @@ static std::vector str_to_requests(const std::string& std::string rs = std::string("retrieve,") + str; - Log::debug() << "Parsing request string : " << rs << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Parsing request string : " << rs << std::endl; std::istringstream in(rs); metkit::mars::MarsParser parser(in); std::vector p = parser.parse(); - Log::debug() << "Parsed requests:" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Parsed requests:" << std::endl; for (auto j = p.begin(); j != p.end(); ++j) { j->dump(Log::debug()); } @@ -73,7 +73,7 @@ static std::vector str_to_requests(const std::string& std::vector v = expand.expand(p); - Log::debug() << "Expanded requests:" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Expanded requests:" << std::endl; for (auto j = v.begin(); j != v.end(); ++j) { j->dump(Log::debug()); } diff --git a/src/fdb5/rados/RadosStore.cc b/src/fdb5/rados/RadosStore.cc index ef44535cc..8f9cbadcb 100644 --- a/src/fdb5/rados/RadosStore.cc +++ b/src/fdb5/rados/RadosStore.cc @@ -122,7 +122,7 @@ eckit::DataHandle *RadosStore::createFileHandle(const eckit::PathName &path) { // static size_t sizeBuffer = eckit::Resource("fdbBufferSize", 64 * 1024 * 1024); - eckit::Log::debug() << "Creating RadosWriteHandle to " << path + LOG_DEBUG_LIB(LibFdb5) << "Creating RadosWriteHandle to " << path // << " with buffer of " << eckit::Bytes(sizeBuffer) << std::endl; diff --git a/src/fdb5/remote/Connection.cc b/src/fdb5/remote/Connection.cc index e8669f6d3..b15ef945a 100644 --- a/src/fdb5/remote/Connection.cc +++ b/src/fdb5/remote/Connection.cc @@ -108,7 +108,7 @@ void Connection::write(remote::Message msg, bool control, uint32_t clientID, uin // std::cout << "WRITE [" << "endpoint=" << ((control || single_) ? controlSocket() : dataSocket()).remotePort() << ",message=" << message.message << ",clientID=" << message.clientID() << ",requestID=" << message.requestID << ",payload=" << message.payloadSize << "]" << std::endl; - eckit::Log::debug() << "Connection::write [message=" << msg << ",clientID=" << message.clientID() << ",requestID=" << requestID << ",data=" << data.size() << ",payload=" << payloadLength << "]" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Connection::write [message=" << msg << ",clientID=" << message.clientID() << ",requestID=" << requestID << ",data=" << data.size() << ",payload=" << payloadLength << "]" << std::endl; std::lock_guard lock((control || single_) ? controlMutex_ : dataMutex_); writeUnsafe(control, &message, sizeof(message)); diff --git a/src/fdb5/remote/Messages.cc b/src/fdb5/remote/Messages.cc index e30fc1ced..6f9df650c 100644 --- a/src/fdb5/remote/Messages.cc +++ b/src/fdb5/remote/Messages.cc @@ -15,24 +15,19 @@ #include "fdb5/remote/Messages.h" - -//#include "eckit/serialisation/Stream.h" - using namespace eckit; - -namespace fdb5 { -namespace remote { +namespace fdb5::remote { //---------------------------------------------------------------------------------------------------------------------- - std::ostream& operator<<(std::ostream& s, const Message& m) { switch (m) { case Message::None: s << "None"; break; case Message::Exit: s << "Exit"; break; case Message::Startup: s << "Startup"; break; case Message::Error: s << "Error"; break; + case Message::Stop: s << "Stop"; break; case Message::Stores: s << "Stores"; break; case Message::Schema: s << "Schema"; break; @@ -64,15 +59,6 @@ std::ostream& operator<<(std::ostream& s, const Message& m) { return s; } -// MessageHeader::MessageHeader(Message message, bool control, const Handler& clientID, uint32_t requestID, uint32_t payloadSize) : -// marker(StartMarker), -// version(CurrentVersion), -// message(message), -// clientID_((clientID.clientId()<<1) + (control ? 1 : 0)), -// requestID(requestID), -// payloadSize(payloadSize) {} - - MessageHeader::MessageHeader(Message message, bool control, uint32_t clientID, uint32_t requestID, uint32_t payloadSize) : marker(StartMarker), version(CurrentVersion), @@ -81,33 +67,6 @@ MessageHeader::MessageHeader(Message message, bool control, uint32_t clientID, u requestID(requestID), payloadSize(payloadSize) {} -//ClassSpec MessageHeader::classSpec_ = {&MessageHeader::classSpec(), "MessageHeader",}; -//Reanimator MessageHeader::reanimator_; -// -// -//MessageHeader::MessageHeader(Message message, uint16_t payloadSize=0) : -// marker(StartMarker), -// version(CurrentVersion), -// message(message), -// payloadSize(payloadSize) {} -// -//MessageHeader::MessageHeader(Stream &s) : -// marker(s) { -// s >> version; -// uint16_t tmp; -// s >> tmp; -// message = static_cast(tmp); -// s >> payloadSize; -//} -// -//void MessageHeader::encode(Stream &s) const { -// s << marker; -// s << version; -// s << static_cast(message); -// s << payloadSize; -//} - //---------------------------------------------------------------------------------------------------------------------- -} // namespace remote -} // namespace fdb5 +} // namespace fdb5::remote diff --git a/src/fdb5/remote/client/ClientConnection.cc b/src/fdb5/remote/client/ClientConnection.cc index 779e6f8df..cff6f105b 100644 --- a/src/fdb5/remote/client/ClientConnection.cc +++ b/src/fdb5/remote/client/ClientConnection.cc @@ -60,7 +60,7 @@ class DataWriteRequest { ClientConnection::ClientConnection(const eckit::net::Endpoint& controlEndpoint, const std::string& defaultEndpoint): controlEndpoint_(controlEndpoint), defaultEndpoint_(defaultEndpoint), id_(1), connected_(false), dataWriteQueue_(nullptr) { - eckit::Log::debug() << "ClientConnection::ClientConnection() controlEndpoint: " << controlEndpoint << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "ClientConnection::ClientConnection() controlEndpoint: " << controlEndpoint << std::endl; } void ClientConnection::add(Client& client) { @@ -125,14 +125,14 @@ bool ClientConnection::connect(bool singleAttempt) { try { // Connect to server, and check that the server is happy on the response - eckit::Log::debug() << "Connecting to host: " << controlEndpoint_ << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Connecting to host: " << controlEndpoint_ << std::endl; controlClient_.connect(controlEndpoint_, fdbMaxConnectRetries, fdbConnectTimeout); writeControlStartupMessage(); eckit::SessionID serverSession = verifyServerStartupResponse(); // Connect to the specified data port - eckit::Log::debug() << "Received data endpoint from host: " << dataEndpoint_ << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Received data endpoint from host: " << dataEndpoint_ << std::endl; dataClient_.connect(dataEndpoint_, fdbMaxConnectRetries, fdbConnectTimeout); writeDataStartupMessage(serverSession); @@ -353,7 +353,7 @@ void ClientConnection::listeningControlThreadLoop() { eckit::Buffer payload = Connection::readControl(hdr); - eckit::Log::debug() << "ClientConnection::listeningControlThreadLoop - got [message=" << hdr.message << ",requestID=" << hdr.requestID << ",payload=" << hdr.payloadSize << "]" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "ClientConnection::listeningControlThreadLoop - got [message=" << hdr.message << ",requestID=" << hdr.requestID << ",payload=" << hdr.payloadSize << "]" << std::endl; if (hdr.message == Message::Exit) { return; @@ -422,7 +422,7 @@ void ClientConnection::listeningDataThreadLoop() { eckit::Buffer payload = Connection::readData(hdr); - eckit::Log::debug() << "ClientConnection::listeningDataThreadLoop - got [message=" << hdr.message << ",requestID=" << hdr.requestID << ",payload=" << hdr.payloadSize << "]" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "ClientConnection::listeningDataThreadLoop - got [message=" << hdr.message << ",requestID=" << hdr.requestID << ",payload=" << hdr.payloadSize << "]" << std::endl; if (hdr.message == Message::Exit) { return; diff --git a/src/fdb5/remote/client/RemoteCatalogue.cc b/src/fdb5/remote/client/RemoteCatalogue.cc index b886cad84..984c8861c 100644 --- a/src/fdb5/remote/client/RemoteCatalogue.cc +++ b/src/fdb5/remote/client/RemoteCatalogue.cc @@ -124,7 +124,7 @@ void RemoteCatalogue::flush() { MemoryStream s(sendBuf); s << numLocations_; - eckit::Log::debug() << " RemoteCatalogue::flush - flushing " << numLocations_ << " fields" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << " RemoteCatalogue::flush - flushing " << numLocations_ << " fields" << std::endl; // The flush call is blocking uint32_t id = generateRequestID(); @@ -154,7 +154,7 @@ void RemoteCatalogue::loadSchema() { // (outside of the catalogue) if (!schema_) { - eckit::Log::debug() << "RemoteCatalogue::loadSchema()" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "RemoteCatalogue::loadSchema()" << std::endl; // send dbkey to remote. eckit::Buffer keyBuffer(4096); @@ -170,14 +170,14 @@ void RemoteCatalogue::loadSchema() { } bool RemoteCatalogue::handle(Message message, bool control, uint32_t requestID) { - eckit::Log::debug() << *this << " - Received [message=" << ((uint) message) << ",requestID=" << requestID << "]" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << *this << " - Received [message=" << ((uint) message) << ",requestID=" << requestID << "]" << std::endl; NOTIMP; return false; } bool RemoteCatalogue::handle(Message message, bool control, uint32_t requestID, eckit::Buffer&& payload) { - eckit::Log::debug() << *this << " - Received [message=" << ((uint) message) << ",requestID=" << requestID << ",payloadSize=" << payload.size() << "]" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << *this << " - Received [message=" << ((uint) message) << ",requestID=" << requestID << ",payloadSize=" << payload.size() << "]" << std::endl; // if (message == Message::Schema) { - // eckit::Log::debug() << "RemoteCatalogue::handle received payload size: " << payload.size() << std::endl; + // LOG_DEBUG_LIB(LibFdb5) << "RemoteCatalogue::handle received payload size: " << payload.size() << std::endl; // MemoryStream s(payload); // schema_ = std::unique_ptr(eckit::Reanimator::reanimate(s)); // return true; diff --git a/src/fdb5/remote/client/RemoteStore.cc b/src/fdb5/remote/client/RemoteStore.cc index f78d1b8cd..14e28045c 100644 --- a/src/fdb5/remote/client/RemoteStore.cc +++ b/src/fdb5/remote/client/RemoteStore.cc @@ -296,7 +296,7 @@ void RemoteStore::flush() { MemoryStream s(sendBuf); s << stats.numArchive(); - eckit::Log::debug() << " RemoteStore::flush - flushing " << stats.numArchive() << " fields" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << " RemoteStore::flush - flushing " << stats.numArchive() << " fields" << std::endl; // The flush call is blocking uint32_t id = generateRequestID(); controlWriteCheckResponse(Message::Flush, id, false, sendBuf, s.position()); diff --git a/src/fdb5/remote/server/AvailablePortList.cc b/src/fdb5/remote/server/AvailablePortList.cc index fd2828002..112c66f55 100644 --- a/src/fdb5/remote/server/AvailablePortList.cc +++ b/src/fdb5/remote/server/AvailablePortList.cc @@ -46,7 +46,7 @@ std::set readServices() { std::ifstream in(servicesFile.localPath()); - Log::debug() << "Scanning for ports to avoid in services file " << servicesFile << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Scanning for ports to avoid in services file " << servicesFile << std::endl; if (!in) { Log::error() << servicesFile << Log::syserr << std::endl; @@ -84,7 +84,7 @@ std::set readServices() { const std::string& port = s[1]; const std::string& protocol = s[2]; - Log::debug() << "Skipping port " << port << " service " << sname << " protocol " << protocol << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Skipping port " << port << " service " << sname << " protocol " << protocol << std::endl; int p = toInt(port); portsToSkip.insert(p); diff --git a/src/fdb5/remote/server/CatalogueHandler.cc b/src/fdb5/remote/server/CatalogueHandler.cc index 75bda0b63..51d00b9c8 100644 --- a/src/fdb5/remote/server/CatalogueHandler.cc +++ b/src/fdb5/remote/server/CatalogueHandler.cc @@ -299,7 +299,7 @@ void CatalogueHandler::stores(uint32_t clientID, uint32_t requestID) { } } - Log::debug() << "Client " << clientIPaddress << " from network '" << clientNetwork << "'" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Client " << clientIPaddress << " from network '" << clientNetwork << "'" << std::endl; ASSERT(config_.has("stores")); std::map> stores; @@ -387,7 +387,7 @@ void CatalogueHandler::archiveBlob(const uint32_t clientID, const uint32_t reque std::unique_ptr location(eckit::Reanimator::reanimate(s)); - Log::debug() << "CatalogueHandler::archiveBlob key: " << idxKey << key << " location: " << location->uri() << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "CatalogueHandler::archiveBlob key: " << idxKey << key << " location: " << location->uri() << std::endl; std::map::iterator it; { diff --git a/src/fdb5/remote/server/ServerConnection.cc b/src/fdb5/remote/server/ServerConnection.cc index 4a736d19b..0d9f5b4e9 100644 --- a/src/fdb5/remote/server/ServerConnection.cc +++ b/src/fdb5/remote/server/ServerConnection.cc @@ -70,7 +70,7 @@ ServerConnection::ServerConnection(eckit::net::TCPSocket& socket, const Config& controlSocket_(socket), numControlConnection_(0), numDataConnection_(0), dataSocket_(nullptr), dataListener_(0) { - eckit::Log::debug() << "ServerConnection::ServerConnection initialized" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "ServerConnection::ServerConnection initialized" << std::endl; } ServerConnection::~ServerConnection() { @@ -137,7 +137,7 @@ Handled ServerConnection::handleData(Message message, uint32_t clientID, uint32_ return Handled::No; } -constexpr eckit::LocalConfiguration ServerConnection::availableFunctionality() { +eckit::LocalConfiguration ServerConnection::availableFunctionality() const { eckit::LocalConfiguration conf; // Add to the configuration all the components that require to be versioned, as in the following example, with a vector of supported version numbers std::vector remoteFieldLocationVersions = {1}; @@ -185,7 +185,7 @@ void ServerConnection::initialiseConnections() { std::vector rflCommon = intersection(clientAvailableFunctionality, serverConf, "RemoteFieldLocation"); if (rflCommon.size() > 0) { - eckit::Log::debug() << "Protocol negotiation - RemoteFieldLocation version " << rflCommon.back() << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Protocol negotiation - RemoteFieldLocation version " << rflCommon.back() << std::endl; agreedConf_.set("RemoteFieldLocation", rflCommon.back()); } else { compatibleProtocol = false; @@ -211,7 +211,7 @@ void ServerConnection::initialiseConnections() { } } - eckit::Log::debug() << "Protocol negotiation - NumberOfConnections " << ncSelected << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Protocol negotiation - NumberOfConnections " << ncSelected << std::endl; agreedConf_.set("NumberOfConnections", ncSelected); single_ = (ncSelected == 1); } @@ -248,7 +248,7 @@ void ServerConnection::initialiseConnections() { s << dataEndpoint; s << agreedConf_.get(); - eckit::Log::debug() << "Protocol negotiation - configuration: " << agreedConf_ <>{{startupBuffer.data(), s.position()}}); } @@ -431,7 +431,7 @@ void ServerConnection::handle() { //tidyWorkers(); eckit::Buffer payload = readControl(hdr); // READ CONTROL - eckit::Log::debug() << "ServerConnection::handle - got [message=" << hdr.message << ",clientID="<< hdr.clientID() << ",requestID=" << hdr.requestID << ",payload=" << hdr.payloadSize << "]" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "ServerConnection::handle - got [message=" << hdr.message << ",clientID="<< hdr.clientID() << ",requestID=" << hdr.requestID << ",payload=" << hdr.payloadSize << "]" << std::endl; if (hdr.message == Message::Stop) { ASSERT(hdr.clientID()); diff --git a/src/fdb5/remote/server/ServerConnection.h b/src/fdb5/remote/server/ServerConnection.h index 2c05f6e59..b9d48b0ca 100644 --- a/src/fdb5/remote/server/ServerConnection.h +++ b/src/fdb5/remote/server/ServerConnection.h @@ -104,7 +104,7 @@ class ServerConnection : public Connection, public Handler { // socket methods int selectDataPort(); - constexpr eckit::LocalConfiguration availableFunctionality(); + eckit::LocalConfiguration availableFunctionality() const; // Worker functionality void tidyWorkers(); diff --git a/src/fdb5/remote/server/StoreHandler.cc b/src/fdb5/remote/server/StoreHandler.cc index b0f7530a4..859c87139 100644 --- a/src/fdb5/remote/server/StoreHandler.cc +++ b/src/fdb5/remote/server/StoreHandler.cc @@ -94,7 +94,7 @@ void StoreHandler::read(uint32_t clientID, uint32_t requestID, const eckit::Buff std::unique_ptr location(eckit::Reanimator::reanimate(s)); - Log::debug() << "Queuing for read: " << requestID << " " << *location << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Queuing for read: " << requestID << " " << *location << std::endl; std::unique_ptr dh; dh.reset(location->dataHandle()); @@ -123,7 +123,7 @@ void StoreHandler::writeToParent(const uint32_t clientID, const uint32_t request long dataRead; dh->openForRead(); - Log::debug() << "Reading: " << requestID << " dh size: " << dh->size() + LOG_DEBUG_LIB(LibFdb5) << "Reading: " << requestID << " dh size: " << dh->size() << std::endl; while ((dataRead = dh->read(writeBuffer, writeBuffer.size())) != 0) { @@ -132,13 +132,13 @@ void StoreHandler::writeToParent(const uint32_t clientID, const uint32_t request // And when we are done, add a complete message. - Log::debug() << "Writing retrieve complete message: " << requestID + LOG_DEBUG_LIB(LibFdb5) << "Writing retrieve complete message: " << requestID << std::endl; write(Message::Complete, false, clientID, requestID); Log::status() << "Done retrieve: " << requestID << std::endl; - Log::debug() << "Done retrieve: " << requestID << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Done retrieve: " << requestID << std::endl; } catch (std::exception& e) { // n.b. more general than eckit::Exception diff --git a/src/fdb5/rules/Predicate.cc b/src/fdb5/rules/Predicate.cc index 5f932d880..1f485eefa 100644 --- a/src/fdb5/rules/Predicate.cc +++ b/src/fdb5/rules/Predicate.cc @@ -24,8 +24,8 @@ eckit::Reanimator Predicate::reanimator_; Predicate::Predicate(const std::string &keyword, Matcher *matcher) : matcher_(matcher), keyword_(keyword) { - // dump(eckit::Log::debug()); - // eckit::Log::debug() << std::endl; + // dump(Log::debug()); + // LOG_DEBUG_LIB(LibFdb5) << std::endl; } Predicate::Predicate(eckit::Stream& s) { diff --git a/src/fdb5/rules/Schema.cc b/src/fdb5/rules/Schema.cc index 7d006ee7f..366f9362c 100644 --- a/src/fdb5/rules/Schema.cc +++ b/src/fdb5/rules/Schema.cc @@ -168,7 +168,7 @@ void Schema::load(const eckit::PathName &path, bool replace) { path_ = path; - eckit::Log::debug() << "Loading FDB rules from " << path << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Loading FDB rules from " << path << std::endl; std::ifstream in(path.localPath()); if (!in) { diff --git a/src/fdb5/toc/EnvVarFileSpaceHandler.cc b/src/fdb5/toc/EnvVarFileSpaceHandler.cc index 64cace0b7..0a04013c9 100644 --- a/src/fdb5/toc/EnvVarFileSpaceHandler.cc +++ b/src/fdb5/toc/EnvVarFileSpaceHandler.cc @@ -46,7 +46,7 @@ eckit::PathName EnvVarFileSpaceHandler::selectFileSystem(const Key& key, const F AutoLock lock(mutex_); - Log::debug() << "Selecting a file system based on environment variable " << fdbFileSpaceSHandlerEnvVarName_ << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Selecting a file system based on environment variable " << fdbFileSpaceSHandlerEnvVarName_ << std::endl; const char* value = ::getenv(fdbFileSpaceSHandlerEnvVarName_.c_str()); if(value) { diff --git a/src/fdb5/toc/ExpverFileSpaceHandler.cc b/src/fdb5/toc/ExpverFileSpaceHandler.cc index 2331e4e88..c99f62c7d 100644 --- a/src/fdb5/toc/ExpverFileSpaceHandler.cc +++ b/src/fdb5/toc/ExpverFileSpaceHandler.cc @@ -42,7 +42,7 @@ ExpverFileSpaceHandler::~ExpverFileSpaceHandler() { void ExpverFileSpaceHandler::load() const { - Log::debug() << "Loading " << fdbExpverFileSystems_ << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Loading " << fdbExpverFileSystems_ << std::endl; std::ifstream in(fdbExpverFileSystems_.localPath()); @@ -138,7 +138,7 @@ eckit::PathName ExpverFileSpaceHandler::append(const std::string& expver, const } if(s[0] == expver) { - Log::debug() << "Found expver " << expver << " " << path << " in " << fdbExpverFileSystems_ << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Found expver " << expver << " " << path << " in " << fdbExpverFileSystems_ << std::endl; return PathName(s[1]); } } @@ -156,7 +156,7 @@ eckit::PathName ExpverFileSpaceHandler::append(const std::string& expver, const // append to the file - Log::debug() << "Appending expver " << expver << " " << path << " to " << fdbExpverFileSystems_ << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Appending expver " << expver << " " << path << " to " << fdbExpverFileSystems_ << std::endl; of << expver << " " << path << std::endl; @@ -171,7 +171,7 @@ PathName ExpverFileSpaceHandler::select(const Key& key, const FileSpace& fs) con } static bool expver_is_valid(const std::string& str) { - Log::debug() << "Validating expver string [" << str << "]" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Validating expver string [" << str << "]" << std::endl; return (str.size() == 4) and std::find_if_not(str.begin(), str.end(), isalnum) == str.end(); } @@ -194,11 +194,11 @@ eckit::PathName ExpverFileSpaceHandler::selectFileSystem(const Key& key, const F if(not expver_is_valid(expver)) throw eckit::BadValue("Invalid expver value " + expver, Here()); - Log::debug() << "Selecting file system for expver [" << expver << "]" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Selecting file system for expver [" << expver << "]" << std::endl; PathTable::const_iterator itr = table_.find(expver); if(itr != table_.end()) { - Log::debug() << "Found expver " << expver << " " << itr->second << " in " << fdbExpverFileSystems_ << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Found expver " << expver << " " << itr->second << " in " << fdbExpverFileSystems_ << std::endl; if (!fdbRootDirectory.empty() && itr->second != fdbRootDirectory) { Log::warning() << "Existing root directory " << itr->second << " does not match FDB5_ROOT. Using existing" << std::endl; @@ -222,7 +222,7 @@ eckit::PathName ExpverFileSpaceHandler::selectFileSystem(const Key& key, const F throw BadParameter(msg.str()); } - Log::debug() << "Using root directory specified by FDB5_ROOT: " << fdbRootDirectory << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Using root directory specified by FDB5_ROOT: " << fdbRootDirectory << std::endl; maybe = fdbRootDirectory; } diff --git a/src/fdb5/toc/FileSpace.cc b/src/fdb5/toc/FileSpace.cc index ab3267f92..567b25b35 100644 --- a/src/fdb5/toc/FileSpace.cc +++ b/src/fdb5/toc/FileSpace.cc @@ -45,12 +45,12 @@ TocPath FileSpace::filesystem(const Key& key, const eckit::PathName& db) const { TocPath existingDB; if (existsDB(key, db, existingDB)) { - Log::debug() << "Found existing DB for key " << key << " -> " << existingDB.directory_ << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Found existing DB for key " << key << " -> " << existingDB.directory_ << std::endl; return existingDB; } - Log::debug() << "FDB for key " << key << " not found, selecting a root" << std::endl; - // Log::debug() << eckit::BackTrace::dump() << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "FDB for key " << key << " not found, selecting a root" << std::endl; + // LOG_DEBUG_LIB(LibFdb5) << eckit::BackTrace::dump() << std::endl; return TocPath{FileSpaceHandler::lookup(handler_).selectFileSystem(key, *this) / db, ControlIdentifiers{}}; } diff --git a/src/fdb5/toc/Root.cc b/src/fdb5/toc/Root.cc index 2fbc6c187..794ec6f25 100644 --- a/src/fdb5/toc/Root.cc +++ b/src/fdb5/toc/Root.cc @@ -47,7 +47,7 @@ bool Root::exists() const { Log::warning() << "FDB root " << path_ << " " << Log::syserr << std::endl; exists_ = false; } - Log::debug() << "Root " << *this << (exists_ ? " exists" : " does NOT exists") << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Root " << *this << (exists_ ? " exists" : " does NOT exists") << std::endl; checked_ = true; } diff --git a/src/fdb5/toc/RootManager.cc b/src/fdb5/toc/RootManager.cc index e0624283e..96ab2f864 100644 --- a/src/fdb5/toc/RootManager.cc +++ b/src/fdb5/toc/RootManager.cc @@ -52,7 +52,7 @@ class DbPathNamer { DbPathNamer(const std::string& keyregex, const std::string& format) : format_(format){ crack(keyregex); - eckit::Log::debug() << "Building " << *this << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Building " << *this << std::endl; } /// Full match of the incomming key with the key regex @@ -236,7 +236,7 @@ static const DbPathNamerTable& readDbNamers(const Config& config) { if(filename.exists()) { - eckit::Log::debug() << "Loading FDB DBPathNames from " << fdbDbNamesFile << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Loading FDB DBPathNames from " << fdbDbNamesFile << std::endl; std::ifstream in(filename.localPath()); @@ -299,7 +299,7 @@ static std::vector readRoots(const eckit::PathName& fdbRootsFile) { std::ifstream in(fdbRootsFile.localPath()); - eckit::Log::debug() << "Loading FDB roots from " << fdbRootsFile << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Loading FDB roots from " << fdbRootsFile << std::endl; if (!in) { eckit::Log::error() << fdbRootsFile << eckit::Log::syserr << std::endl; @@ -417,7 +417,7 @@ static FileSpaceTable parseFileSpacesFile(const eckit::PathName& fdbHome) { eckit::PathName fdbSpacesFile = eckit::Resource("fdbSpacesFile;$FDB_SPACES_FILE", fdbHome / "etc/fdb/spaces"); std::ifstream in(fdbSpacesFile.localPath()); - eckit::Log::debug() << "Loading FDB file spaces from " << fdbSpacesFile << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Loading FDB file spaces from " << fdbSpacesFile << std::endl; if (!in) { throw eckit::ReadError(fdbSpacesFile, Here()); @@ -570,14 +570,14 @@ std::string RootManager::dbPathName(const Key& key) for (DbPathNamerTable::const_iterator i = dbPathNamers_.begin(); i != dbPathNamers_.end() ; ++i) { if(i->match(key)) { dbpath = i->name(key); - eckit::Log::debug() << "DbName is " << dbpath << " for key " << key << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "DbName is " << dbpath << " for key " << key << std::endl; return dbpath; } } // default naming convention for DB's dbpath = key.valuesToString(); - eckit::Log::debug() << "Using default naming convention for key " << key << " -> " << dbpath << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Using default naming convention for key " << key << " -> " << dbpath << std::endl; return dbpath; } @@ -587,7 +587,7 @@ std::vector RootManager::possibleDbPathNames(const InspectionKey& k for (DbPathNamerTable::const_iterator i = dbPathNamers_.begin(); i != dbPathNamers_.end() ; ++i) { if(i->match(key, missing)) { std::string dbpath = i->namePartial(key, missing); - eckit::Log::debug() << "Matched " << *i << " with key " << key << " resulting in dbpath " << dbpath << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Matched " << *i << " with key " << key << " resulting in dbpath " << dbpath << std::endl; result.push_back(dbpath); } } @@ -605,7 +605,7 @@ std::vector RootManager::possibleDbPathNames(const InspectionKey& k } result.push_back(oss.str()); - eckit::Log::debug() << "Using default naming convention for key " << key << " -> " << result.back() << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Using default naming convention for key " << key << " -> " << result.back() << std::endl; return result; } @@ -615,7 +615,7 @@ TocPath RootManager::directory(const Key& key) { PathName dbpath = dbPathName(key); - eckit::Log::debug() << "Choosing directory for key " << key << " dbpath " << dbpath << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Choosing directory for key " << key << " dbpath " << dbpath << std::endl; // override root location for testing purposes only @@ -632,7 +632,7 @@ TocPath RootManager::directory(const Key& key) { for (FileSpaceTable::const_iterator i = spacesTable_.begin(); i != spacesTable_.end() ; ++i) { if(i->match(keystr)) { TocPath db = i->filesystem(key, dbpath); - eckit::Log::debug() << "Database directory " << db.directory_ << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Database directory " << db.directory_ << std::endl; return db; } } @@ -665,24 +665,24 @@ std::vector RootManager::visitableRoots(const std::set& std::transform(keys.begin(), keys.end(), std::back_inserter(keystrings), [](const Key& k) { return k.valuesToString(); }); - Log::debug() << "RootManager::visitableRoots() trying to match keys " << keystrings << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "RootManager::visitableRoots() trying to match keys " << keystrings << std::endl; for (const auto& space : spacesTable_) { bool matched = false; for (const std::string& k : keystrings) { if (space.match(k) || k.empty()) { - Log::debug() << "MATCH space " << space << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "MATCH space " << space << std::endl; space.enabled(ControlIdentifier::List,roots); matched = true; break; } } - if (!matched) Log::debug() << "FAIL to match space " << space << std::endl; + if (!matched) LOG_DEBUG_LIB(LibFdb5) << "FAIL to match space " << space << std::endl; } - Log::debug() << "Visitable Roots " << roots << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Visitable Roots " << roots << std::endl; return std::vector(roots.begin(), roots.end()); } @@ -715,7 +715,7 @@ std::vector RootManager::canArchiveRoots(const Key& key) { } } - Log::debug() << "Roots supporting archival " << roots << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Roots supporting archival " << roots << std::endl; return std::vector(roots.begin(), roots.end()); } @@ -733,7 +733,7 @@ std::vector RootManager::canMoveToRoots(const Key& key) { } } - Log::debug() << "Roots supporting wiping " << roots << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Roots supporting wiping " << roots << std::endl; return std::vector(roots.begin(), roots.end()); } diff --git a/src/fdb5/toc/TocCatalogueReader.cc b/src/fdb5/toc/TocCatalogueReader.cc index adb5892fc..bdb3d9cc5 100644 --- a/src/fdb5/toc/TocCatalogueReader.cc +++ b/src/fdb5/toc/TocCatalogueReader.cc @@ -33,7 +33,7 @@ TocCatalogueReader::TocCatalogueReader(const eckit::URI& uri, const fdb5::Config } TocCatalogueReader::~TocCatalogueReader() { - eckit::Log::debug() << "Closing DB " << (*this) << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Closing DB " << (*this) << std::endl; } void TocCatalogueReader::loadIndexesAndRemap() { @@ -62,7 +62,7 @@ bool TocCatalogueReader::selectIndex(const Key &idxKey) { } } - eckit::Log::debug() << "TocCatalogueReader::selectIndex " << idxKey << ", found " + LOG_DEBUG_LIB(LibFdb5) << "TocCatalogueReader::selectIndex " << idxKey << ", found " << matching_.size() << " matche(s)" << std::endl; return (matching_.size() != 0); @@ -105,8 +105,8 @@ void TocCatalogueReader::close() { } bool TocCatalogueReader::retrieve(const InspectionKey& key, Field& field) const { - eckit::Log::debug() << "Trying to retrieve key " << key << std::endl; - eckit::Log::debug() << "Scanning indexes " << matching_.size() << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Trying to retrieve key " << key << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Scanning indexes " << matching_.size() << std::endl; for (auto m = matching_.begin(); m != matching_.end(); ++m) { const Index& idx((*m)->first); diff --git a/src/fdb5/toc/TocCatalogueWriter.cc b/src/fdb5/toc/TocCatalogueWriter.cc index 21e8bed4e..a58c091cb 100644 --- a/src/fdb5/toc/TocCatalogueWriter.cc +++ b/src/fdb5/toc/TocCatalogueWriter.cc @@ -108,7 +108,7 @@ bool TocCatalogueWriter::open() { void TocCatalogueWriter::clean() { - eckit::Log::debug() << "Closing path " << directory_ << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Closing path " << directory_ << std::endl; flush(); // closes the TOC entries & indexes but not data files @@ -380,7 +380,7 @@ void TocCatalogueWriter::compactSubTocIndexes() { if (useSubToc() && anythingWrittenToSubToc()) { - eckit::Log::debug() << "compacting sub tocs" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "compacting sub tocs" << std::endl; for (IndexStore::iterator j = fullIndexes_.begin(); j != fullIndexes_.end(); ++j) { Index& idx = j->second; diff --git a/src/fdb5/toc/TocEngine.cc b/src/fdb5/toc/TocEngine.cc index 1c253eb80..99be2c22d 100644 --- a/src/fdb5/toc/TocEngine.cc +++ b/src/fdb5/toc/TocEngine.cc @@ -154,7 +154,7 @@ std::set TocEngine::databases(const std::set& ke for (std::vector::const_iterator j = roots.begin(); j != roots.end(); ++j) { - Log::debug() << "Scanning for TOC FDBs in root " << *j << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Scanning for TOC FDBs in root " << *j << std::endl; std::list dbs; scan_dbs(*j, dbs); @@ -168,13 +168,13 @@ std::set TocEngine::databases(const std::set& ke std::string regex = "^" + *j + "/" + *dbpath + "$"; Regex re(searchCaseSensitiveDB ? eckit::StringTools::lower(regex) : regex); - Log::debug() << " -> key i " << *i + LOG_DEBUG_LIB(LibFdb5) << " -> key i " << *i << " dbpath " << *dbpath << " pathregex " << re << std::endl; for (std::list::const_iterator k = dbs.begin(); k != dbs.end(); ++k) { - Log::debug() << " -> db " << *k << std::endl; + LOG_DEBUG_LIB(LibFdb5) << " -> db " << *k << std::endl; if(result.find(*k) != result.end()) { continue; @@ -188,7 +188,7 @@ std::set TocEngine::databases(const std::set& ke } } - Log::debug() << "TocEngine::databases() results " << result << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "TocEngine::databases() results " << result << std::endl; return result; } @@ -201,7 +201,7 @@ std::vector TocEngine::databases(const Key& key, matchKeyToDB(key, keys, regexForMissingValues, config); - Log::debug() << "Matched DB schemas for key " << key << " -> keys " << keys << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Matched DB schemas for key " << key << " -> keys " << keys << std::endl; std::set databasesMatchRegex(databases(keys, roots, config)); @@ -210,7 +210,7 @@ std::vector TocEngine::databases(const Key& key, try { TocHandler toc(path, config); if (toc.databaseKey().match(key)) { - Log::debug() << " found match with " << path << std::endl; + LOG_DEBUG_LIB(LibFdb5) << " found match with " << path << std::endl; result.push_back(eckit::URI(TocEngine::typeName(), path)); } } catch (eckit::Exception& e) { @@ -231,7 +231,7 @@ std::vector TocEngine::databases(const metkit::mars::MarsRequest& re // matchRequestToDB(request, keys, regexForMissingValues, config); matchRequestToDB(request, keys, "", config); - Log::debug() << "Matched DB schemas for request " << request << " -> keys " << keys << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Matched DB schemas for request " << request << " -> keys " << keys << std::endl; std::set databasesMatchRegex(databases(keys, roots, config)); @@ -243,11 +243,11 @@ std::vector TocEngine::databases(const metkit::mars::MarsRequest& re path = path.dirName(); path = path.realName(); - Log::debug() << "FDB processing Path " << path << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "FDB processing Path " << path << std::endl; TocHandler toc(path, config); if (toc.databaseKey().partialMatch(request)) { - Log::debug() << " found match with " << path << std::endl; + LOG_DEBUG_LIB(LibFdb5) << " found match with " << path << std::endl; result.push_back(eckit::URI(TocEngine::typeName(), path)); } } diff --git a/src/fdb5/toc/TocHandler.cc b/src/fdb5/toc/TocHandler.cc index 3b84c7cdf..71d90c866 100644 --- a/src/fdb5/toc/TocHandler.cc +++ b/src/fdb5/toc/TocHandler.cc @@ -161,7 +161,7 @@ TocHandler::TocHandler(const eckit::PathName& path, const Key& parentKey) : Key key(databaseKey()); if (!parentKey.empty() && parentKey != key) { - eckit::Log::debug() << "Opening (remapped) toc with differing parent key: " + LOG_DEBUG_LIB(LibFdb5) << "Opening (remapped) toc with differing parent key: " << key << " --> " << parentKey << std::endl; if (parentKey.size() != key.size()) { @@ -181,7 +181,7 @@ TocHandler::TocHandler(const eckit::PathName& path, const Key& parentKey) : } } - eckit::Log::debug() << "Key remapping: " << remapKey_ << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Key remapping: " << remapKey_ << std::endl; } } } @@ -234,7 +234,7 @@ void TocHandler::openForAppend() { ASSERT(fd_ == -1); - eckit::Log::debug() << "Opening for append TOC " << tocPath_ << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Opening for append TOC " << tocPath_ << std::endl; int iomode = O_WRONLY | O_APPEND; #ifdef O_NOATIME @@ -261,7 +261,7 @@ void TocHandler::openForRead() const { writeMode_ = false; - eckit::Log::debug() << "Opening for read TOC " << tocPath_ << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Opening for read TOC " << tocPath_ << std::endl; int iomode = O_RDONLY; #ifdef O_NOATIME @@ -321,7 +321,7 @@ void TocHandler::append(TocRecord &r, size_t payloadSize ) { ASSERT(fd_ != -1); ASSERT(not cachedToc_); - Log::debug() << "Writing toc entry: " << (int)r.header_.tag_ << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Writing toc entry: " << (int)r.header_.tag_ << std::endl; // Obtain the rounded size, and set it in the record header. size_t roundedSize = roundRecord(r, payloadSize); @@ -431,17 +431,17 @@ bool TocHandler::readNext( TocRecord &r, bool walkSubTocs, bool hideSubTocEntrie std::pair key(absPath.baseName(), 0); if (maskedEntries_.find(key) != maskedEntries_.end()) { if (!readMasked){ - Log::debug() << "SubToc ignored by mask: " << path << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "SubToc ignored by mask: " << path << std::endl; continue; } // This is a masked subtoc, so it is valid for it to not exist. if (!absPath.exists()) { - Log::debug() << "SubToc does not exist: " << path << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "SubToc does not exist: " << path << std::endl; continue; } } - eckit::Log::debug() << "Opening SUB_TOC: " << absPath << " " << parentKey_ << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Opening SUB_TOC: " << absPath << " " << parentKey_ << std::endl; subTocRead_.reset(new TocHandler(absPath, parentKey_)); subTocRead_->openForRead(); @@ -467,12 +467,12 @@ bool TocHandler::readNext( TocRecord &r, bool walkSubTocs, bool hideSubTocEntrie std::pair key(absPath.baseName(), offset); if (maskedEntries_.find(key) != maskedEntries_.end()) { if(!readMasked){ - Log::debug() << "Index ignored by mask: " << path << ":" << offset << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Index ignored by mask: " << path << ":" << offset << std::endl; continue; } // This is a masked index, so it is valid for it to not exist. if (!absPath.exists()) { - Log::debug() << "Index does not exist: " << path << ":" << offset << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Index does not exist: " << path << ":" << offset << std::endl; continue; } } @@ -582,7 +582,7 @@ void TocHandler::close() const { } if ( fd_ >= 0 ) { - eckit::Log::debug() << "Closing TOC " << tocPath_ << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Closing TOC " << tocPath_ << std::endl; if(dirty_) { SYSCALL2( eckit::fdatasync(fd_), tocPath_ ); dirty_ = false; @@ -733,12 +733,12 @@ void TocHandler::writeInitRecord(const Key &key) { size_t len = readNext(*r); if (len == 0) { - eckit::Log::debug() << "Initializing FDB TOC in " << tocPath_ << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Initializing FDB TOC in " << tocPath_ << std::endl; if (!isSubToc_) { /* Copy schema first */ - eckit::Log::debug() << "Copy schema from " + LOG_DEBUG_LIB(LibFdb5) << "Copy schema from " << dbConfig_.schemaPath() << " to " << schemaPath_ @@ -817,7 +817,7 @@ void TocHandler::writeSubTocRecord(const TocHandler& subToc) { s << off_t{0}; append(*r, s.position()); - eckit::Log::debug() << "Write TOC_SUB_TOC " << path << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Write TOC_SUB_TOC " << path << std::endl; } @@ -843,7 +843,7 @@ void TocHandler::writeIndexRecord(const Index& index) { index_.encode(s, r->header_.serialisationVersion_); handler_.append(*r, s.position()); - eckit::Log::debug() << "Write TOC_INDEX " << location.uri().path().baseName() << " - " << location.offset() << " " << index_.type() << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Write TOC_INDEX " << location.uri().path().baseName() << " - " << location.offset() << " " << index_.type() << std::endl; } private: @@ -1401,7 +1401,7 @@ size_t TocHandler::buildClearRecord(TocRecord &r, const Index &index) { s << location.offset(); ASSERT(sz_ == 0); sz_ = s.position(); - eckit::Log::debug() << "Write TOC_CLEAR " << location.uri().path().baseName() << " - " << location.offset() << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Write TOC_CLEAR " << location.uri().path().baseName() << " - " << location.offset() << std::endl; } size_t size() const { return sz_; } diff --git a/src/fdb5/toc/TocIndex.cc b/src/fdb5/toc/TocIndex.cc index b5aa13bac..40a857b35 100644 --- a/src/fdb5/toc/TocIndex.cc +++ b/src/fdb5/toc/TocIndex.cc @@ -95,7 +95,7 @@ bool TocIndex::get(const InspectionKey &key, const Key &remapKey, Field &field) void TocIndex::open() { if (!btree_) { - eckit::Log::debug() << "Opening " << *this << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Opening " << *this << std::endl; btree_.reset(BTreeIndexFactory::build(type_, location_.path_, mode_ == TocIndex::READ, location_.offset_)); if (mode_ == TocIndex::READ && preloadBTree_) btree_->preload(); } @@ -119,7 +119,7 @@ void TocIndex::reopen() { void TocIndex::close() { if (btree_) { - eckit::Log::debug() << "Closing " << *this << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Closing " << *this << std::endl; btree_.reset(); } } diff --git a/src/fdb5/toc/TocSerialisationVersion.cc b/src/fdb5/toc/TocSerialisationVersion.cc index 78fe0ab36..6a759ab9e 100644 --- a/src/fdb5/toc/TocSerialisationVersion.cc +++ b/src/fdb5/toc/TocSerialisationVersion.cc @@ -9,6 +9,8 @@ */ #include "eckit/config/Resource.h" + +#include "fdb5/LibFdb5.h" #include "fdb5/toc/TocSerialisationVersion.h" namespace fdb5 { @@ -19,7 +21,7 @@ static unsigned getUserEnvSerialisationVersion() { eckit::Resource("fdbSerialisationVersion;$FDB5_SERIALISATION_VERSION", 0); if (fdbSerialisationVersion && fdbSerialisationVersion != TocSerialisationVersion::defaulted()) { - eckit::Log::debug() << "fdbSerialisationVersion overidde to version: " << fdbSerialisationVersion << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "fdbSerialisationVersion overidde to version: " << fdbSerialisationVersion << std::endl; } return fdbSerialisationVersion; // default is 0 (not defined by user/service) } @@ -31,7 +33,7 @@ TocSerialisationVersion::TocSerialisationVersion(const fdb5::Config& config) { } else { static int tocSerialisationVersion = config.getInt("tocSerialisationVersion", 0); if (tocSerialisationVersion && tocSerialisationVersion != TocSerialisationVersion::defaulted()) { - eckit::Log::debug() << "tocSerialisationVersion overidde to version: " << tocSerialisationVersion << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "tocSerialisationVersion overidde to version: " << tocSerialisationVersion << std::endl; used_ = tocSerialisationVersion; } else { used_ = defaulted(); diff --git a/src/fdb5/toc/TocStore.cc b/src/fdb5/toc/TocStore.cc index edd1426c3..973aab34a 100644 --- a/src/fdb5/toc/TocStore.cc +++ b/src/fdb5/toc/TocStore.cc @@ -123,14 +123,14 @@ eckit::DataHandle *TocStore::createFileHandle(const eckit::PathName &path) { if(stripeLustre()) { - eckit::Log::debug() << "Creating LustreFileHandle to " << path + LOG_DEBUG_LIB(LibFdb5) << "Creating LustreFileHandle to " << path << " buffer size " << sizeBuffer << std::endl; return new LustreFileHandle(path, sizeBuffer, stripeDataLustreSettings()); } - eckit::Log::debug() << "Creating FDBFileHandle to " << path + LOG_DEBUG_LIB(LibFdb5) << "Creating FDBFileHandle to " << path << " with buffer of " << eckit::Bytes(sizeBuffer) << std::endl; @@ -144,7 +144,7 @@ eckit::DataHandle *TocStore::createAsyncHandle(const eckit::PathName &path) { if(stripeLustre()) { - eckit::Log::debug() << "Creating LustreFileHandle to " << path + LOG_DEBUG_LIB(LibFdb5) << "Creating LustreFileHandle to " << path << " with " << nbBuffers << " buffer each with " << eckit::Bytes(sizeBuffer) << std::endl; @@ -268,7 +268,7 @@ void TocStore::remove(const Key& key) const { while ((dp = ::readdir(dirp)) != NULL) { if (strstr( dp->d_name, ".data")) { eckit::PathName dataFile = src_db / dp->d_name; - eckit::Log::debug() << "Removing " << dataFile << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Removing " << dataFile << std::endl; dataFile.unlink(false); } } diff --git a/src/fdb5/tools/FDBInspect.cc b/src/fdb5/tools/FDBInspect.cc index db5d88c58..3b18a4792 100644 --- a/src/fdb5/tools/FDBInspect.cc +++ b/src/fdb5/tools/FDBInspect.cc @@ -62,7 +62,7 @@ void FDBInspect::init(const eckit::option::CmdArgs &args) { void FDBInspect::execute(const eckit::option::CmdArgs &args) { - eckit::Log::debug() << " FDBInspect minimum-keys " << minimumKeys_ << " @ " << Here() << std::endl; + LOG_DEBUG_LIB(LibFdb5) << " FDBInspect minimum-keys " << minimumKeys_ << " @ " << Here() << std::endl; bool all = args.getBool("all", false); @@ -73,7 +73,7 @@ void FDBInspect::execute(const eckit::option::CmdArgs &args) { bool ignoreErrors = args.getBool("ignore-errors", true); if (ignoreErrors) { - Log::debug() << "Errors ignored where possible" << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Errors ignored where possible" << std::endl; fail_ = false; } @@ -81,10 +81,10 @@ void FDBInspect::execute(const eckit::option::CmdArgs &args) { if (all) { Key dbKey; - Log::debug() << "KEY =====> " << dbKey << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "KEY =====> " << dbKey << std::endl; std::vector dbs = Manager().visitableLocations(dbKey); for (std::vector::const_iterator j = dbs.begin(); j != dbs.end(); ++j) { - Log::debug() << "Visitable FDB DB location " << *j << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Visitable FDB DB location " << *j << std::endl; paths.push_back(*j); } @@ -111,7 +111,7 @@ void FDBInspect::execute(const eckit::option::CmdArgs &args) { ToolRequest req(args(i), force ? std::vector() : minimumKeys_); - Log::debug() << "KEY =====> " << req.key() << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "KEY =====> " << req.key() << std::endl; std::vector dbs = Manager().visitableLocations(req.key()); for (std::vector::const_iterator j = dbs.begin(); j != dbs.end(); ++j) { paths.push_back(*j); @@ -149,7 +149,7 @@ void FDBInspect::execute(const eckit::option::CmdArgs &args) { } - Log::debug() << "FDBInspect processing path " << path << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "FDBInspect processing path " << path << std::endl; process(path , args); } diff --git a/src/fdb5/tools/fdb-move.cc b/src/fdb5/tools/fdb-move.cc index 62a1353cc..d44a2d612 100644 --- a/src/fdb5/tools/fdb-move.cc +++ b/src/fdb5/tools/fdb-move.cc @@ -120,8 +120,8 @@ class MoveProducer : public eckit::distributed::Producer { throw FDBToolException(ss.str()); } - Log::debug() << "Request: " << request << std::endl; - Log::debug() << "Destination: " << destination << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Request: " << request << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Destination: " << destination << std::endl; moveIterator_ = new fdb_moveiterator_t(fdb_.move(request, destination)); } @@ -134,7 +134,7 @@ class MoveProducer : public eckit::distributed::Producer { fdb5::MoveElement elem; if (moveIterator_->next(elem)) { - Log::debug() << "MoveProducer " << elem << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "MoveProducer " << elem << std::endl; if (!elem.sync()) { list_.push_back(elem); elem.encode(message); @@ -191,7 +191,7 @@ class MoveWorker : public eckit::distributed::Consumer { void consume(eckit::distributed::Message& message) override { fdb5::FileCopy fileCopy(message); - Log::debug() << "MoveWorker " << fileCopy << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "MoveWorker " << fileCopy << std::endl; count_++; fileCopy.execute(); @@ -203,7 +203,7 @@ class MoveWorker : public eckit::distributed::Consumer { // virtual void getNextMessage(eckit::Message& message) const; // virtual void failure(eckit::Message &message); void shutdown(eckit::distributed::Message & message) override { - eckit::Log::debug() << "Shuting down MoveWorker..." << std::endl; + LOG_DEBUG_LIB(LibFdb5) << "Shuting down MoveWorker..." << std::endl; message << count_; } diff --git a/tests/regressions/FDB-310/fdb-url.cc b/tests/regressions/FDB-310/fdb-url.cc index e8b15a137..054de6e95 100644 --- a/tests/regressions/FDB-310/fdb-url.cc +++ b/tests/regressions/FDB-310/fdb-url.cc @@ -18,6 +18,7 @@ #include "metkit/mars/MarsParser.h" #include "metkit/mars/MarsExpension.h" +#include "fdb5/LibFdb5.h" #include "fdb5/api/FDB.h" #include "fdb5/message/MessageDecoder.h" #include "fdb5/io/HandleGatherer.h" @@ -99,10 +100,10 @@ void FDBUrl::execute(const eckit::option::CmdArgs &args) { fdb5::ListIterator it = fdb.inspect(request); while (it.next(el)) { eckit::URI uri = el.location().fullUri(); - eckit::Log::debug() << uri << std::endl; + LOG_DEBUG_LIB(fdb5::LibFdb5) << uri << std::endl; std::string uriStr = uri.asRawString(); - eckit::Log::debug() << uriStr << std::endl; + LOG_DEBUG_LIB(fdb5::LibFdb5) << uriStr << std::endl; eckit::URI newUri(uriStr); handles.add(fdb.read(newUri));