char *log_prefix;
event_log_prefix_callback_t *log_prefix_callback;
void *log_prefix_callback_context;
+ enum log_type min_log_level;
bool log_prefix_from_system_pool:1;
bool log_prefix_replace:1;
bool passthrough:1;
{
event->always_log_source = parent->always_log_source;
event->passthrough = parent->passthrough;
+ event->min_log_level = parent->min_log_level;
event->forced_debug = parent->forced_debug;
}
event->id = ++event_id_counter;
event->pool = pool;
event->tv_created_ioloop = ioloop_timeval;
+ event->min_log_level = LOG_TYPE_INFO;
if (gettimeofday(&event->tv_created, NULL) < 0)
i_panic("gettimeofday() failed: %m");
event->source_filename = p_strdup(pool, source_filename);
return event;
}
+struct event *event_set_min_log_level(struct event *event, enum log_type level)
+{
+ event->min_log_level = level;
+ return event;
+}
+
+enum log_type event_get_min_log_level(const struct event *event)
+{
+ return event->min_log_level;
+}
+
struct event_category *event_category_find_registered(const char *name)
{
struct event_category *const *catp;
it allow quickly finding which of the otherwise identical syscalls in the
code generated the error. */
struct event *event_set_always_log_source(struct event *event);
+/* Set minimum log level for the event */
+struct event *event_set_min_log_level(struct event *event, enum log_type level);
+enum log_type event_get_min_log_level(const struct event *event);
/* Add NULL-terminated list of categories to the event. The categories pointer
doesn't need to stay valid afterwards, but the event_category structs