MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ should_log()

bool MayaFlux::Journal::Archivist::Impl::should_log ( Severity  severity,
Component  component,
Context  context 
) const
inlineprivate

Definition at line 170 of file Archivist.cpp.

171 {
172 if (severity != Severity::NONE && severity < m_min_severity.load(std::memory_order_relaxed))
173 return false;
174
175 auto comp_idx = static_cast<size_t>(component);
176 if (comp_idx >= m_component_filters.size()
177 || !m_component_filters[comp_idx].load(std::memory_order_acquire))
178 return false;
179
180 auto ctx_idx = static_cast<size_t>(context);
181
182 return ctx_idx < m_context_filters.size()
183 && m_context_filters[ctx_idx].load(std::memory_order_acquire);
184 }
std::string severity
Definition Config.cpp:18
std::array< std::atomic< bool >, magic_enum::enum_count< Component >()> m_component_filters
std::atomic< Severity > m_min_severity
std::array< std::atomic< bool >, magic_enum::enum_count< Context >()> m_context_filters

References m_component_filters, m_context_filters, m_min_severity, MayaFlux::Journal::NONE, and severity.

Referenced by scribe(), and scribe_rt().

+ Here is the caller graph for this function: