diff options
author | Paul Fariello <paul@fariello.eu> | 2019-03-05 20:14:02 +0140 |
---|---|---|
committer | Paul Fariello <paul@fariello.eu> | 2019-04-10 16:31:45 +0200 |
commit | 3d8c928e53fd8fecab44448e0d1b64ce4ed1a63c (patch) | |
tree | 57a83aca92ba91fcd6307d2675a19557dd63bffd | |
parent | bcd582be42c34b0ae41c81961b84a33bda33f997 (diff) | |
download | profani-tty-3d8c928e53fd8fecab44448e0d1b64ce4ed1a63c.tar.gz |
Use profanity logs for OMEMO logs
-rw-r--r-- | src/omemo/omemo.c | 16 |
1 files changed, 15 insertions, 1 deletions
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 |