16 #ifndef included_vlib_log_h 17 #define included_vlib_log_h 21 #define foreach_vlib_log_level \ 35 #define _(uc,lc) VLIB_LOG_LEVEL_##uc, 105 struct timeval time_zero_timeval;
129 #define vlib_log_emerg(...) vlib_log(VLIB_LOG_LEVEL_EMERG, __VA_ARGS__) 130 #define vlib_log_alert(...) vlib_log(VLIB_LOG_LEVEL_ALERT, __VA_ARGS__) 131 #define vlib_log_crit(...) vlib_log(VLIB_LOG_LEVEL_CRIT, __VA_ARGS__) 132 #define vlib_log_err(...) vlib_log(VLIB_LOG_LEVEL_ERR, __VA_ARGS__) 133 #define vlib_log_warn(...) vlib_log(VLIB_LOG_LEVEL_WARNING, __VA_ARGS__) 134 #define vlib_log_notice(...) vlib_log(VLIB_LOG_LEVEL_NOTICE, __VA_ARGS__) 135 #define vlib_log_info(...) vlib_log(VLIB_LOG_LEVEL_INFO, __VA_ARGS__) 136 #define vlib_log_debug(...) vlib_log(VLIB_LOG_LEVEL_DEBUG, __VA_ARGS__) 138 #define VLIB_REGISTER_LOG_CLASS(x,...) \ 139 __VA_ARGS__ vlib_log_class_registration_t x; \ 140 static void __clib_constructor \ 141 __vlib_add_log_registration_##x (void) \ 143 vlib_log_main_t * lm = &log_main; \ 144 x.next = lm->registrations; \ 146 lm->registrations = &x; \ 148 __VA_ARGS__ vlib_log_class_registration_t x
vlib_log_entry_t * entries
u8 * format_vlib_log_class(u8 *s, va_list *args)
vlib_log_level_t syslog_level
vlib_log_class_data_t * classes
vlib_log_class_t vlib_log_register_class(char *vlass, char *subclass)
vlib_log_class_registration_t * registrations
struct vlib_log_registration * next
u8 * format_vlib_log_level(u8 *s, va_list *args)
struct vlib_log_registration vlib_log_class_registration_t
#define foreach_vlib_log_level
int default_syslog_log_level
vlib_log_level_t syslog_level
void vlib_log(vlib_log_level_t level, vlib_log_class_t class, char *fmt,...)
vlib_log_subclass_data_t * subclasses
vlib_log_class_t vlib_log_register_class_rate_limit(char *class, char *subclass, u32 rate_limit)
vlib_log_level_t default_syslog_level
vlib_log_class_config_t * configs
vlib_log_level_t default_level
u32 max_class_name_length
uword * config_index_by_name