Skip to content
Snippets Groups Projects
ConfigService.cpp 67.1 KiB
Newer Older
int ConfigServiceImpl::FindLowestFilterLevel() const {
  int lowestPriority = Logger::Priority::PRIO_FATAL;
  // Find the lowest level of all of the filter channels
  for (const auto &filterChannelName : m_filterChannels) {
Nick Draper's avatar
Nick Draper committed
      auto *channel = Poco::LoggingRegistry::defaultRegistry().channelForName(
          filterChannelName);
      auto *filterChannel = dynamic_cast<Poco::FilterChannel *>(channel);
      if (filterChannel) {
        int filterPriority = filterChannel->getPriority();
        if (filterPriority > lowestPriority) {
          lowestPriority = filterPriority;
        }
      }
    } catch (Poco::NotFoundException &) {
      g_log.warning(filterChannelName +
                    " registered log filter channel not found");
    }
  }

  return lowestPriority;
}
template DLLExport int ConfigServiceImpl::getValue(const std::string &,
                                                   double &);
template DLLExport int ConfigServiceImpl::getValue(const std::string &,
                                                   std::string &);
template DLLExport int ConfigServiceImpl::getValue(const std::string &, int &);
template DLLExport int ConfigServiceImpl::getValue(const std::string &,
                                                   std::size_t &);

} // namespace Kernel
} // namespace Mantid