aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/log.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-10-21 12:43:40 +0200
committerDamjan Marion <dmarion@me.com>2020-10-21 17:46:01 +0000
commit06d82260d9913dbb6be98aef00830ef4967b1f55 (patch)
treeb17623257674ab57fb912b805a57b29211975cd2 /src/vlib/log.h
parent210fda269147e47ff434c0a194d17e6cef0fdd74 (diff)
vlib: print logs to stderr if interactive or nosyslog set
If VPP is started in interactive mode, instead of sending logs to syslog server we print them directly to stderr. Output is colorized, but that can be turned off with unix { nocolor } Type: improvement Change-Id: I9a0f0803e4cba2849a6efa0b6a86b9614ed33ced Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/log.h')
-rw-r--r--src/vlib/log.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vlib/log.h b/src/vlib/log.h
index 9206ad0fcc6..9a0c44475d2 100644
--- a/src/vlib/log.h
+++ b/src/vlib/log.h
@@ -22,7 +22,7 @@
_(0, EMERG, emerg) \
_(1, ALERT, alert) \
_(2, CRIT, crit) \
- _(3, ERR, err) \
+ _(3, ERR, error) \
_(4, WARNING, warn) \
_(5, NOTICE, notice) \
_(6, INFO, info) \
@@ -79,7 +79,7 @@ typedef struct
int default_log_level;
int default_syslog_log_level;
int unthrottle_time;
- u32 indent;
+ u32 max_class_name_length;
/* time zero */
struct timeval time_zero_timeval;
@@ -93,11 +93,11 @@ vlib_log_class_t vlib_log_register_class (char *vlass, char *subclass);
vlib_log_class_t
vlib_log_register_class_rate_limit (char *class, char *subclass,
u32 rate_limit);
-u32 vlib_log_get_indent ();
void vlib_log (vlib_log_level_t level, vlib_log_class_t class, char *fmt,
...);
int last_log_entry ();
u8 *format_vlib_log_class (u8 * s, va_list * args);
+u8 *format_vlib_log_level (u8 * s, va_list * args);
#define vlib_log_emerg(...) vlib_log(VLIB_LOG_LEVEL_EMERG, __VA_ARGS__)
#define vlib_log_alert(...) vlib_log(VLIB_LOG_LEVEL_ALERT, __VA_ARGS__)