eal/windows: add missing SPDX license tag
[dpdk.git] / lib / librte_eal / common / eal_common_log.c
index d7a5f9b..c5554ba 100644 (file)
 
 #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 {
@@ -29,7 +39,7 @@ 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;
@@ -53,11 +63,6 @@ struct log_cur_msg {
        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);
 
@@ -207,7 +212,7 @@ int rte_log_save_regexp(const char *regex, int tmp)
        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)
 {