diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-09-23 15:56:44 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-09-23 15:56:44 +0200 |
commit | f43bac58947fd208bfb0cc5d6c6c1e4ba34d10ff (patch) | |
tree | ee9cf30e08c4114fd561dc51b9d96318a00f4e06 /src | |
parent | 7234e063a7bb2571dafef4edc3d3f90d3b78c063 (diff) |
fix #4673
Diffstat (limited to 'src')
-rw-r--r-- | src/exchange/taler-exchange-httpd.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c index aa6812889..75a765720 100644 --- a/src/exchange/taler-exchange-httpd.c +++ b/src/exchange/taler-exchange-httpd.c @@ -928,6 +928,8 @@ main (int argc, char *const *argv) { char *cfgfile = NULL; + char *loglev = NULL; + char *logfile = NULL; const struct GNUNET_GETOPT_CommandLineOption options[] = { {'C', "connection-close", NULL, "force HTTP connections to be closed after each request", 0, @@ -945,6 +947,8 @@ main (int argc, &GNUNET_GETOPT_set_filename, &input_filename}, #endif GNUNET_GETOPT_OPTION_HELP ("HTTP server providing a RESTful API to access a Taler exchange"), + GNUNET_GETOPT_OPTION_LOGLEVEL (&loglev), + GNUNET_GETOPT_OPTION_LOGFILE (&logfile), GNUNET_GETOPT_OPTION_VERSION (VERSION "-" VCS_VERSION), GNUNET_GETOPT_OPTION_END }; @@ -954,15 +958,15 @@ main (int argc, int fh = -1; int fh_admin = -1; - GNUNET_assert (GNUNET_OK == - GNUNET_log_setup ("taler-exchange-httpd", - "INFO", - NULL)); if (0 >= GNUNET_GETOPT_run ("taler-exchange-httpd", options, argc, argv)) return 1; + GNUNET_assert (GNUNET_OK == + GNUNET_log_setup ("taler-exchange-httpd", + (NULL == loglev) ? "INFO" : loglev, + logfile)); if (NULL == cfgfile) cfgfile = GNUNET_strdup (GNUNET_OS_project_data_get ()->user_config_file); cfg = GNUNET_CONFIGURATION_create (); |