ccproxy.plugins.access_log.formatter¶
ccproxy.plugins.access_log.formatter
¶
AccessLogFormatter
¶
Format access logs for both client and provider levels.
Supports Common Log Format, Combined Log Format, and Structured JSON.
format_client
¶
Format client access log based on specified format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict[str, Any]
|
Log data dictionary |
required |
format_type
|
str
|
One of "common", "combined", or "structured" |
required |
Returns:
| Type | Description |
|---|---|
str
|
Formatted log line |
Source code in ccproxy/plugins/access_log/formatter.py
format_provider
¶
Format provider access log (always structured).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict[str, Any]
|
Log data dictionary |
required |
Returns:
| Type | Description |
|---|---|
str
|
JSON formatted log line |