Log level "post" controls whether POSTed content is logged. This
is enabled by default. To disable, use -v -post on the command
line.
struct http_buf *next;
};
struct http_buf *next;
};
+static int log_level_post = 0;
static void proxy_io(IOCHAN i, int event);
static struct http_channel *http_channel_create(http_server_t http_server,
static void proxy_io(IOCHAN i, int event);
static struct http_channel *http_channel_create(http_server_t http_server,
hc->request->path,
*hc->request->search ? "?" : "",
hc->request->search);
hc->request->path,
*hc->request->search ? "?" : "",
hc->request->search);
- if (hc->request->content_buf)
- yaz_log(YLOG_LOG, "%s", hc->request->content_buf);
+ if (hc->request->content_buf && log_level_post)
+ yaz_log(log_level_post, "%s", hc->request->content_buf);
if (http_weshouldproxy(hc->request))
http_proxy(hc->request);
else
if (http_weshouldproxy(hc->request))
http_proxy(hc->request);
else
hs->proxy_addr = 0;
hs->ref_count = 1;
hs->http_sessions = 0;
hs->proxy_addr = 0;
hs->ref_count = 1;
hs->http_sessions = 0;
+
+ log_level_post = yaz_log_module_level("post");
+
#endif
yaz_log_init_prefix("pazpar2");
#endif
yaz_log_init_prefix("pazpar2");
+ yaz_log_init_level(yaz_log_mask_str("post"));
yaz_log_xml_errors(0, YLOG_WARN);
yaz_enable_panic_backtrace(argv[0]);
yaz_log_xml_errors(0, YLOG_WARN);
yaz_enable_panic_backtrace(argv[0]);