MCPcopy Create free account
hub / github.com/apache/arrow / RegisterLogger

Method RegisterLogger

cpp/src/arrow/util/logger.cc:84–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84Status LoggerRegistry::RegisterLogger(std::string_view name,
85 std::shared_ptr<Logger> logger) {
86 DCHECK_NE(logger, nullptr);
87 auto registry = GetRegistry();
88
89 std::lock_guard<std::mutex> lk(registry->mtx);
90 auto ret = registry->loggers.emplace(name, std::move(logger));
91 ARROW_RETURN_IF(!ret.second, Status::Invalid("Logger with name \"", std::string(name),
92 "\" is already registered"));
93 return Status::OK();
94}
95
96void LoggerRegistry::UnregisterLogger(std::string_view name) {
97 auto registry = GetRegistry();

Callers

nothing calls this directly

Calls 3

GetRegistryFunction · 0.85
InvalidFunction · 0.50
OKFunction · 0.50

Tested by

no test coverage detected