char hostname[HOST_NAME_MAX+1];
bool reopening_logs;
bool schedule_reopen_logs;
+ int forced_log_priority;
struct debug_settings settings;
debug_callback_fn callback;
};
int priority;
+ if (state.forced_log_priority != -1) {
+ level = state.forced_log_priority;
+ }
+
if (level < 0 || (size_t)level >= ARRAY_SIZE(priority_map))
priority = LOG_DEBUG;
else
strlcpy(state.hostname, name, sizeof(state.hostname));
}
+void debug_set_forced_log_priority(int forced_log_priority)
+{
+ state.forced_log_priority = forced_log_priority;
+}
+
/**
* Ensure debug logs are initialised.
*
const char *logging_param,
int syslog_level, bool syslog_only);
void debug_set_hostname(const char *name);
+void debug_set_forced_log_priority(int forced_log_priority);
bool reopen_logs_internal( void );
void force_check_log_size( void );
bool need_to_check_log_size( void );