summaryrefslogtreecommitdiff
path: root/src/journal/journal-gatewayd.c
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/journal-gatewayd.c
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/journal-gatewayd.c')
-rw-r--r--src/journal/journal-gatewayd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/journal/journal-gatewayd.c b/src/journal/journal-gatewayd.c
index 862ee79030..c9a243841d 100644
--- a/src/journal/journal-gatewayd.c
+++ b/src/journal/journal-gatewayd.c
@@ -1024,6 +1024,11 @@ int main(int argc, char *argv[]) {
if (r == 0)
return EXIT_SUCCESS;
+#ifdef HAVE_GNUTLS
+ gnutls_global_set_log_function(log_func_gnutls);
+ gnutls_global_set_log_level(GNUTLS_LOG_LEVEL);
+#endif
+
n = sd_listen_fds(1);
if (n < 0) {
log_error("Failed to determine passed sockets: %s", strerror(-n));