void
rspamd_log_set_log_level (rspamd_logger_t *logger, gint level)
{
- g_assert (logger != NULL);
+ if (logger == NULL) {
+ logger = default_logger;
+ }
logger->log_level = level;
}
+gint
+rspamd_log_get_log_level (rspamd_logger_t *logger)
+{
+ if (logger == NULL) {
+ logger = default_logger;
+ }
+
+ return logger->log_level;
+}
+
void
rspamd_log_set_log_flags (rspamd_logger_t *logger, gint flags)
{
gsize mlen,
rspamd_logger_t *rspamd_log,
gpointer arg);
-const gchar *rspamd_get_log_severity_string(gint level_flags);
static const struct rspamd_logger_funcs console_log_funcs = {
.init = rspamd_log_console_init,