b8a1347a9ea2cecf0d16f24748c2600fea8c7158Timo Sirainen const char *source_filename, unsigned int source_linenum,
b8a1347a9ea2cecf0d16f24748c2600fea8c7158Timo Sirainen e_error(event, __FILE__, __LINE__, __VA_ARGS__)
b8a1347a9ea2cecf0d16f24748c2600fea8c7158Timo Sirainen const char *source_filename, unsigned int source_linenum,
b8a1347a9ea2cecf0d16f24748c2600fea8c7158Timo Sirainen e_warning(event, __FILE__, __LINE__, __VA_ARGS__)
b8a1347a9ea2cecf0d16f24748c2600fea8c7158Timo Sirainen const char *source_filename, unsigned int source_linenum,
b8a1347a9ea2cecf0d16f24748c2600fea8c7158Timo Sirainen e_info(event, __FILE__, __LINE__, __VA_ARGS__)
b8a1347a9ea2cecf0d16f24748c2600fea8c7158Timo Sirainen const char *source_filename, unsigned int source_linenum,
c6ab22366939966e59492b29fd42a350d54331f0Timo Sirainen if (event_want_debug(_tmp_event, __FILE__, __LINE__)) \
c6ab22366939966e59492b29fd42a350d54331f0Timo Sirainen e_debug(_tmp_event, __FILE__, __LINE__, __VA_ARGS__); \
c6ab22366939966e59492b29fd42a350d54331f0Timo Sirainen/* Returns TRUE if debug event should be sent (either logged or sent to
c6ab22366939966e59492b29fd42a350d54331f0Timo Sirainenbool event_want_debug(struct event *event, const char *source_filename,
b8a1347a9ea2cecf0d16f24748c2600fea8c7158Timo Sirainenvoid event_log(struct event *event, const struct event_log_params *params,
b8a1347a9ea2cecf0d16f24748c2600fea8c7158Timo Sirainen const char *fmt, ...)
b8a1347a9ea2cecf0d16f24748c2600fea8c7158Timo Sirainenvoid event_logv(struct event *event, const struct event_log_params *params,
b8a1347a9ea2cecf0d16f24748c2600fea8c7158Timo Sirainen/* If debugging is forced, the global debug log filter is ignored. Changing
b8a1347a9ea2cecf0d16f24748c2600fea8c7158Timo Sirainen this applies only to this event and any child event that is created
b8a1347a9ea2cecf0d16f24748c2600fea8c7158Timo Sirainen afterwards. It doesn't apply to existing child events (mainly for
b8a1347a9ea2cecf0d16f24748c2600fea8c7158Timo Sirainen performance reasons).
b8a1347a9ea2cecf0d16f24748c2600fea8c7158Timo Sirainen Note that it's always recommended to use e.g.:
b8a1347a9ea2cecf0d16f24748c2600fea8c7158Timo Sirainen if (set->debug) event_set_forced_debug(event, TRUE); // good
b8a1347a9ea2cecf0d16f24748c2600fea8c7158Timo Sirainen event_set_forced_debug(event, set->debug); // bad
b8a1347a9ea2cecf0d16f24748c2600fea8c7158Timo Sirainen This is because the event may already have had debugging enabled via the
b8a1347a9ea2cecf0d16f24748c2600fea8c7158Timo Sirainen parent event. Forcing it to FALSE is most likely not wanted. */
b8a1347a9ea2cecf0d16f24748c2600fea8c7158Timo Sirainenstruct event *event_set_forced_debug(struct event *event, bool force);
c6ab22366939966e59492b29fd42a350d54331f0Timo Sirainen/* Set the global filter to logging debug events. */
c6ab22366939966e59492b29fd42a350d54331f0Timo Sirainenvoid event_set_global_debug_log_filter(struct event_filter *filter);
c6ab22366939966e59492b29fd42a350d54331f0Timo Sirainen/* Return the current global debug log event filter. */
c6ab22366939966e59492b29fd42a350d54331f0Timo Sirainenstruct event_filter *event_get_global_debug_log_filter(void);
c6ab22366939966e59492b29fd42a350d54331f0Timo Sirainen/* Unset global debug log filter, if one exists. */
c6ab22366939966e59492b29fd42a350d54331f0Timo Sirainenvoid event_unset_global_debug_log_filter(void);
c6ab22366939966e59492b29fd42a350d54331f0Timo Sirainen/* Set the global filter to sending debug events. The debug events are also
c6ab22366939966e59492b29fd42a350d54331f0Timo Sirainen sent if they match the global debug log filter. */
c6ab22366939966e59492b29fd42a350d54331f0Timo Sirainenvoid event_set_global_debug_send_filter(struct event_filter *filter);
c6ab22366939966e59492b29fd42a350d54331f0Timo Sirainen/* Return the current global debug send event filter. */
c6ab22366939966e59492b29fd42a350d54331f0Timo Sirainenstruct event_filter *event_get_global_debug_send_filter(void);
c6ab22366939966e59492b29fd42a350d54331f0Timo Sirainen/* Unset global debug send filter, if one exists. */