MCPcopy Create free account
hub / github.com/Xtra-Computing/thundersvm / get

Method get

src/thundersvm/util/log.cpp:1814–1836  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1812 }
1813
1814 Logger* RegisteredLoggers::get(const std::string& id, bool forceCreation) {
1815 base::threading::ScopedLock scopedLock(lock());
1816 Logger* logger_ = base::utils::Registry<Logger, std::string>::get(id);
1817 if (logger_ == nullptr && forceCreation) {
1818 bool validId = Logger::isValidId(id);
1819 if (!validId) {
1820 ELPP_ASSERT(validId, "Invalid logger ID [" << id << "]. Not registering this logger.");
1821 return nullptr;
1822 }
1823 logger_ = new Logger(id, m_defaultConfigurations, &m_logStreamsReference);
1824 logger_->m_logBuilder = m_defaultLogBuilder;
1825 registerNew(id, logger_);
1826 LoggerRegistrationCallback* callback = nullptr;
1827 for (const std::pair<std::string, base::type::LoggerRegistrationCallbackPtr>& h
1828 : m_loggerRegistrationCallbacks) {
1829 callback = h.second.get();
1830 if (callback != nullptr && callback->enabled()) {
1831 callback->handle(logger_);
1832 }
1833 }
1834 }
1835 return logger_;
1836 }
1837
1838 bool RegisteredLoggers::remove(const std::string& id) {
1839 if (id == base::consts::kDefaultLoggerId) {

Callers 11

fileStreamMethod · 0.45
insertFileMethod · 0.45
unsafeFlushAllMethod · 0.45
StorageMethod · 0.45
dispatchMethod · 0.45
initializeLoggerMethod · 0.45
PerformanceTrackerMethod · 0.45
~PerformanceTrackerMethod · 0.45
checkpointMethod · 0.45
getLoggerMethod · 0.45

Calls 2

enabledMethod · 0.45
handleMethod · 0.45

Tested by

no test coverage detected