summaryrefslogtreecommitdiff
path: root/src/journal/microhttpd-util.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-11-28 23:08:35 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-03-17 01:55:48 -0400
commitcafc7f91306ea17ace4a6c3d76d81c8780c87452 (patch)
tree160ecf5f841dce56eff55acdd0cea9055208205f /src/journal/microhttpd-util.h
parent6031319956b4b1d13799373bfda3e8690f6fa874 (diff)
journal-gatewayd: log to journal from gnutls
Prefix "gnutls: " is added. Some semi-random mapping of gnutls levels to syslog levels is done, but since gnutls levels seem to be used rather loosely, most end up as debug.
Diffstat (limited to 'src/journal/microhttpd-util.h')
-rw-r--r--src/journal/microhttpd-util.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/journal/microhttpd-util.h b/src/journal/microhttpd-util.h
index 74d1668bdf..4afe0a29d1 100644
--- a/src/journal/microhttpd-util.h
+++ b/src/journal/microhttpd-util.h
@@ -26,3 +26,15 @@
#include "macro.h"
void microhttpd_logger(void *arg, const char *fmt, va_list ap) _printf_(2, 0);
+
+#ifdef HAVE_GNUTLS
+#include <gnutls/gnutls.h>
+
+void log_func_gnutls(int level, const char *message);
+
+/* This is additionally filtered by our internal log level, so it
+ * should be set fairly high to capture all potentially interesting
+ * events without overwhelming detail.
+ */
+#define GNUTLS_LOG_LEVEL 6
+#endif