.\" (C) 2023, NGINX, Inc. .\" .TH nxt_unit_log 3 (date) "NGINX Unit (unreleased)" .SH Name nxt_unit_req_log, nxt_unit_req_alert, nxt_unit_req_error, nxt_unit_req_warn, nxt_unit_req_debug \- print messages to the debug log related to a request in a Unit app .SH Library NGINX Unit library .RI ( libunit ", " -lunit ) .SH Synopsis .nf .B #include .PP .B [[gnu::format(printf, 3, 4)]] .BI "void nxt_unit_req_log(nxt_unit_request_info_t *_Nullable " req , .BI " int " level ", const char *" fmt ", ...);" .PP .BI "#define nxt_unit_req_alert(" req ", " fmt ", ...) \fR/* ... */\fP" .BI "#define nxt_unit_req_error(" req ", " fmt ", ...) \fR/* ... */\fP" .BI "#define nxt_unit_req_warn(" req ", " fmt ", ...) \fR/* ... */\fP" .BI "#define nxt_unit_req_debug(" req ", " fmt ", ...) \fR/* ... */\fP" .fi .SH Arguments .TP .I req Request object. .TP .I level Log level .TP .I fmt See .MR snprintf 3 . .SH Description .MR nxt_unit_req_log 3 is similar to .MR nxt_unit_log 3 , but it associates the log to a specific request. .SH Return value None. .SH Errors If these functions fail to write to the Unit debug log, they will fall back to standard error. .SH Files .TP .I /usr/local/var/log/unit/unit.log Unit debug log. See .MR unitd 8 . .SH Examples See .MR nxt_unit_response_add_field 3 . .SH Copyright (C) 2017-2023, NGINX, Inc. .PP SPDX-License-Identifier: Apache-2.0 .SH See also .MR nxt_unit_log 3 , .MR unitd 8 . .PP .UR https://unit.nginx.org Website .UE .PP .UR https://mailman.nginx.org/mailman/listinfo/unit Mailing list .UE .PP .UR https://github.com/nginx/unit GitHub .UE