|
Pharos 0.7.23
Modern Web Framework & Web App Hosting Service.
|
Declares native access log and error log helpers. More...
#include "native_http_request.h"Go to the source code of this file.
Functions | |
HTTP access log helpers | |
| void | native_write_error_log (const char *log_path, const char *error_report_path, const char *app_id, const HttpRequest *request, const char *request_path, const char *status_text, const char *reason, const char *resource_path, const char *detail_text) |
| Writes one structured error log entry and its paired JSONL error report. | |
| void | native_write_access_log (const char *log_path, const HttpRequest *request, const char *request_path, int status_code) |
| Writes one access log entry for a completed HTTP request. | |
Declares native access log and error log helpers.
Definition in file native_http_access_log.h.
| void native_write_access_log | ( | const char * | log_path, |
| const HttpRequest * | request, | ||
| const char * | request_path, | ||
| int | status_code ) |
Writes one access log entry for a completed HTTP request.
| log_path | Access log file path. |
| request | Request that was served. |
| request_path | Normalized request path. |
| status_code | Final HTTP status code. |
Definition at line 197 of file native_http_access_log.c.
References access_timestamp_native(), close_logged_file_native(), compact_log_text_native(), ensure_directory(), HttpRequest::headers, http_status_text_native(), HttpRequest::method, path_dirname(), request_headers_with_client_ip_native(), and request_real_ip_native().
Referenced by handle_app_or_runtime_request(), and native_serve_static_file().
| void native_write_error_log | ( | const char * | log_path, |
| const char * | error_report_path, | ||
| const char * | app_id, | ||
| const HttpRequest * | request, | ||
| const char * | request_path, | ||
| const char * | status_text, | ||
| const char * | reason, | ||
| const char * | resource_path, | ||
| const char * | detail_text ) |
Writes one structured error log entry and its paired JSONL error report.
| log_path | Access or runtime log path. |
| error_report_path | Optional explicit JSONL error report path. |
| app_id | App identifier associated with the failure. |
| request | Request associated with the failure. |
| request_path | Normalized request path. |
| status_text | HTTP status line or reason text. |
| reason | Stable failure reason label. |
| resource_path | Resource path associated with the failure. |
| detail_text | Optional detail text to include. |
Definition at line 142 of file native_http_access_log.c.
References access_timestamp_native(), close_logged_file_native(), compact_log_text_native(), ensure_directory(), HttpRequest::headers, HttpRequest::method, path_dirname(), request_headers_with_client_ip_native(), request_real_ip_native(), and write_error_report_native().
Referenced by handle_app_or_runtime_request(), and native_serve_static_file().