Pharos
0.7.23
Modern Web Framework & Web App Hosting Service.
Toggle main menu visibility
Loading...
Searching...
No Matches
native_http_access_log.h
Go to the documentation of this file.
1
/**
2
* @file
3
* @brief Declares native access log and error log helpers.
4
*/
5
6
#ifndef PHAROS_NATIVE_HTTP_ACCESS_LOG_H
7
#define PHAROS_NATIVE_HTTP_ACCESS_LOG_H
8
9
#include "
native_http_request.h
"
10
11
/** @name HTTP access log helpers
12
* @{
13
*/
14
/**
15
* @brief Writes one structured error log entry and its paired JSONL error report.
16
* @param log_path Access or runtime log path.
17
* @param error_report_path Optional explicit JSONL error report path.
18
* @param app_id App identifier associated with the failure.
19
* @param request Request associated with the failure.
20
* @param request_path Normalized request path.
21
* @param status_text HTTP status line or reason text.
22
* @param reason Stable failure reason label.
23
* @param resource_path Resource path associated with the failure.
24
* @param detail_text Optional detail text to include.
25
*/
26
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);
27
/**
28
* @brief Writes one access log entry for a completed HTTP request.
29
* @param log_path Access log file path.
30
* @param request Request that was served.
31
* @param request_path Normalized request path.
32
* @param status_code Final HTTP status code.
33
*/
34
void
native_write_access_log
(
const
char
*log_path,
const
HttpRequest
*request,
const
char
*request_path,
int
status_code);
35
36
/** @} */
37
#endif
native_write_access_log
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.
Definition
native_http_access_log.c:197
native_write_error_log
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.
Definition
native_http_access_log.c:142
native_http_request.h
Declares the parsed HTTP request record and request parsing helpers.
HttpRequest
Parsed HTTP request fields extracted from a native connection.
Definition
native_http_request.h:16
src
native_runtime
c
native_http_access_log.h
Generated by
1.17.0