{
if (type >= rte_logs.dynamic_types_len)
return -1;
- if (level > RTE_LOG_DEBUG)
+ if (level > RTE_LOG_MAX)
return -1;
rte_logs.dynamic_types[type].loglevel = level;
regex_t r;
size_t i;
- if (level > RTE_LOG_DEBUG)
+ if (level > RTE_LOG_MAX)
return -1;
if (regcomp(&r, regex, 0) != 0)
{
size_t i;
- if (level > RTE_LOG_DEBUG)
+ if (level > RTE_LOG_MAX)
return -1;
for (i = 0; i < rte_logs.dynamic_types_len; i++) {
return type;
TAILQ_FOREACH(opt_ll, &opt_loglevel_list, next) {
- if (opt_ll->level > RTE_LOG_DEBUG)
+ if (opt_ll->level > RTE_LOG_MAX)
continue;
if (opt_ll->pattern) {
return -1;
/* look for named values, skip 0 which is not a valid level */
- for (i = 1; i < RTE_DIM(levels); i++) {
+ for (i = 1; i <= RTE_LOG_MAX; i++) {
if (strncmp(levels[i], level, len) == 0)
return i;
}
#define RTE_LOG_NOTICE 6U /**< Normal but significant condition. */
#define RTE_LOG_INFO 7U /**< Informational. */
#define RTE_LOG_DEBUG 8U /**< Debug-level messages. */
+#define RTE_LOG_MAX RTE_LOG_DEBUG /**< Most detailed log level. */
/**
* Change the stream that will be used by the logging system.