From b0ff245ca8609686a42025af6241279e2b5d2163 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Wed, 5 Aug 2020 16:11:20 +0300 Subject: Improved mkstemp() error reporting. The invocation parameters should be logged as well, notably the path of the file that is failed to be created. Also, log level changed to ALERT as it's quite critical error. --- src/nxt_h1proto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nxt_h1proto.c b/src/nxt_h1proto.c index 859ed02f..b34be019 100644 --- a/src/nxt_h1proto.c +++ b/src/nxt_h1proto.c @@ -906,7 +906,7 @@ nxt_h1p_request_body_read(nxt_task_t *task, nxt_http_request_t *r) b->file->fd = mkstemp((char *) tmp_name.start); if (nxt_slow_path(b->file->fd == -1)) { - nxt_log(task, NXT_LOG_ERR, "mkstemp() failed %E", nxt_errno); + nxt_alert(task, "mkstemp(%s) failed %E", tmp_name.start, nxt_errno); status = NXT_HTTP_INTERNAL_SERVER_ERROR; goto error; -- cgit