summaryrefslogtreecommitdiffstats
path: root/src/vlib/log.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-10-21 19:43:36 +0200
committerFlorin Coras <florin.coras@gmail.com>2020-10-21 21:52:17 +0000
commit055e64066d88576ed516e5f50de7ec3d5b6cef0a (patch)
treef958b11ba38e4735b5fd858b927eece527e9aa1d /src/vlib/log.h
parent65c56c83ce4e58178b5ad90a8f325692c9904381 (diff)
vlib: per-class logging configuration in startup.conf
logging { class avf { rate-limit 200 level debug syslog-level debug } class dpdk/cryptodev { rate-limit 200 level disabled syslog-level disabled } } Type: improvement Change-Id: Iebe49b3ed4dfbfd589e80fcd2f9a63a8fe66b83b Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/log.h')
-rw-r--r--src/vlib/log.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/vlib/log.h b/src/vlib/log.h
index 9a0c44475d2..4cceb4b962a 100644
--- a/src/vlib/log.h
+++ b/src/vlib/log.h
@@ -68,6 +68,14 @@ typedef struct
typedef struct
{
+ vlib_log_level_t level;
+ vlib_log_level_t syslog_level;
+ int rate_limit;
+ char *name;
+} vlib_log_class_config_t;
+
+typedef struct
+{
vlib_log_entry_t *entries;
vlib_log_class_data_t *classes;
int size, next, count;
@@ -85,6 +93,9 @@ typedef struct
struct timeval time_zero_timeval;
f64 time_zero;
+ /* config */
+ vlib_log_class_config_t *configs;
+ uword *config_index_by_name;
} vlib_log_main_t;
extern vlib_log_main_t log_main;