if (rte_logs.dynamic_types[i].name == NULL)
continue;
- if (fnmatch(pattern, rte_logs.dynamic_types[i].name, 0))
+ if (fnmatch(pattern, rte_logs.dynamic_types[i].name, 0) == 0)
rte_logs.dynamic_types[i].loglevel = level;
}
}
/* Register an extended log type and try to pick its level from EAL options */
-int __rte_experimental
+int
rte_log_register_type_and_pick_level(const char *name, uint32_t level_def)
{
struct rte_eal_opt_loglevel *opt_ll;
};
/* Logging should be first initializer (before drivers and bus) */
-RTE_INIT_PRIO(rte_log_init, LOG);
-static void
-rte_log_init(void)
+RTE_INIT_PRIO(rte_log_init, LOG)
{
uint32_t i;