aboutsummaryrefslogtreecommitdiff
path: root/src/mint/taler-mint-httpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mint/taler-mint-httpd.c')
-rw-r--r--src/mint/taler-mint-httpd.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/mint/taler-mint-httpd.c b/src/mint/taler-mint-httpd.c
index 55ecd58d2..328fa0357 100644
--- a/src/mint/taler-mint-httpd.c
+++ b/src/mint/taler-mint-httpd.c
@@ -610,6 +610,31 @@ connection_done (void *cls,
/**
+ * Function called for logging by MHD.
+ *
+ * @param cls closure, NULL
+ * @param fm format string (`printf()`-style)
+ * @param ap arguments to @a fm
+ */
+static void
+handle_mhd_logs (void *cls,
+ const char *fm,
+ va_list ap)
+{
+ char buf[2048];
+
+ vsnprintf (buf,
+ sizeof (buf),
+ fm,
+ ap);
+ GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING,
+ "libmicrohttpd",
+ "%s",
+ buf);
+}
+
+
+/**
* The main function of the taler-mint-httpd server ("the mint").
*
* @param argc number of arguments from the command line
@@ -665,6 +690,7 @@ main (int argc,
serve_port,
NULL, NULL,
&handle_mhd_request, NULL,
+ MHD_OPTION_EXTERNAL_LOGGER, &handle_mhd_logs, NULL,
MHD_OPTION_NOTIFY_COMPLETED, &handle_mhd_completion_callback, NULL,
MHD_OPTION_CONNECTION_TIMEOUT, connection_timeout,
#if HAVE_DEVELOPER