#include "eal_private.h"
-/* global log structure */
-struct rte_logs rte_logs = {
+struct rte_log_dynamic_type {
+ const char *name;
+ uint32_t loglevel;
+};
+
+/** The rte_log structure. */
+static struct rte_logs {
+ uint32_t type; /**< Bitfield with enabled logs. */
+ uint32_t level; /**< Log level. */
+ FILE *file; /**< Output file set by rte_openlog_stream, or NULL. */
+ size_t dynamic_types_len;
+ struct rte_log_dynamic_type *dynamic_types;
+} rte_logs = {
.type = ~0,
.level = RTE_LOG_DEBUG,
- .file = NULL,
};
struct rte_eal_opt_loglevel {
TAILQ_ENTRY(rte_eal_opt_loglevel) next;
/** Compiled regular expression obtained from the option */
regex_t re_match;
- /** Glob match string option */
+ /** Globbing pattern option */
char *pattern;
/** Log level value obtained from the option */
uint32_t level;
uint32_t logtype; /**< log type - see rte_log.h */
};
-struct rte_log_dynamic_type {
- const char *name;
- uint32_t loglevel;
-};
-
/* per core log */
static RTE_DEFINE_PER_LCORE(struct log_cur_msg, log_cur_msg);
return rte_log_save_level(tmp, regex, NULL);
}
-/* set log level based on glob (file match) pattern */
+/* set log level based on globbing pattern */
int
rte_log_set_level_pattern(const char *pattern, uint32_t level)
{