RootLogger *logger = TAILQ_FIRST(&active_loggers);
LoggerThreadStoreNode *thread_store_node = TAILQ_FIRST(thread_store);
while (logger && thread_store_node) {
- if (logger->LogFunc != NULL) {
- logger->LogFunc(tv, p, thread_store_node->thread_data);
- }
+ logger->LogFunc(tv, p, thread_store_node->thread_data);
+
logger = TAILQ_NEXT(logger, entries);
thread_store_node = TAILQ_NEXT(thread_store_node, entries);
}
ThreadExitPrintStatsFunc ThreadExitPrintStats,
OutputLogFunc LogFunc, OutputGetActiveCountFunc ActiveCntFunc)
{
+ BUG_ON(LogFunc == NULL);
+
RootLogger *logger = SCCalloc(1, sizeof(*logger));
if (logger == NULL) {
FatalError(SC_ERR_MEM_ALLOC, "failed to alloc root logger");