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

◆ scribe()

void MayaFlux::Journal::Archivist::Impl::scribe ( const JournalEntry entry)
inline

Definition at line 68 of file Archivist.cpp.

69 {
70 if (!m_accepting_entries.load(std::memory_order_acquire))
71 return;
72
73 if (!should_log(entry.severity, entry.component, entry.context))
74 return;
75
76 RealtimeEntry rt(entry.severity, entry.component, entry.context,
77 entry.message, entry.location);
78
79 while (m_push_lock.test_and_set(std::memory_order_acquire))
80 ;
81 const bool pushed = m_ring_buffer.push(rt);
82 m_push_lock.clear(std::memory_order_release);
83
84 if (!pushed)
85 m_dropped_messages.fetch_add(1, std::memory_order_relaxed);
86 }
bool should_log(Severity severity, Component component, Context context) const
std::atomic< bool > m_accepting_entries
Memory::LockFreeQueue< RealtimeEntry, RING_BUFFER_SIZE > m_ring_buffer
std::atomic< uint64_t > m_dropped_messages

References MayaFlux::Journal::JournalEntry::component, MayaFlux::Journal::JournalEntry::context, MayaFlux::Journal::JournalEntry::location, m_accepting_entries, m_dropped_messages, m_push_lock, m_ring_buffer, MayaFlux::Journal::JournalEntry::message, MayaFlux::Journal::JournalEntry::severity, and should_log().

+ Here is the call graph for this function: