MCPcopy Create free account
hub / github.com/FastLED/FastLED / async_log_service

Function async_log_service

src/fl/log/async_logger.cpp.hpp:203–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201// ============================================================================
202
203void async_log_service() {
204 // Get background flush state
205 detail::BackgroundFlushState& state = Singleton<detail::BackgroundFlushState>::instance();
206
207 // Quick check - return immediately if no flush needed
208 if (!state.mNeedsFlush) {
209 return;
210 }
211
212 // Clear flag
213 state.mNeedsFlush = false;
214
215 // Flush all instantiated async loggers (uses ActiveLoggerRegistry)
216 // Only flushes loggers that have been accessed via template functions
217 fl::size n = state.mMessagesPerTick;
218 detail::ActiveLoggerRegistry::instance().forEach([n](AsyncLogger& logger) {
219 logger.flushN(n);
220 });
221}
222
223// ============================================================================
224// Auto-instantiating service task implementation

Callers 1

async_logger.hppFile · 0.85

Calls 2

forEachMethod · 0.80
flushNMethod · 0.80

Tested by

no test coverage detected