From 3d8c928e53fd8fecab44448e0d1b64ce4ed1a63c Mon Sep 17 00:00:00 2001 From: Paul Fariello Date: Tue, 5 Mar 2019 20:14:02 +0140 Subject: Use profanity logs for OMEMO logs --- src/omemo/omemo.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/omemo') diff --git a/src/omemo/omemo.c b/src/omemo/omemo.c index 6e964e81..98b6f24b 100644 --- a/src/omemo/omemo.c +++ b/src/omemo/omemo.c @@ -594,7 +594,21 @@ unlock(void *user_data) static void omemo_log(int level, const char *message, size_t len, void *user_data) { - cons_show("OMEMO: %s", message); + switch (level) { + case SG_LOG_ERROR: + log_error("OMEMO: %s", message); + break; + case SG_LOG_WARNING: + log_warning("OMEMO: %s", message); + break; + case SG_LOG_NOTICE: + case SG_LOG_INFO: + log_info("OMEMO: %s", message); + break; + case SG_LOG_DEBUG: + log_debug("OMEMO: %s", message); + break; + } } static gboolean -- cgit 1.4.1-2-gfad0