- 新增 access_log.c / access_log.h:Nginx combined 格式,线程安全 - cocoon.h / config.c / config.h:支持 access_log 配置字段 - main.c:新增 --access-log CLI 选项,'-' 表示 stdout - server.c:connection_t 扩展 client_addr/addr_len/response_status - server.c:handle_request 中记录 response_status 并调用 access_log_write - Makefile:加入 access_log.c,更新单元测试编译规则 - cocoon.json:示例配置添加 access_log - 集成测试:新增 5 项访问日志测试 - 59 项集成测试全部通过,35 个单元测试全部通过
13 lines
256 B
JSON
13 lines
256 B
JSON
{
|
|
"root_dir": "./examples/www",
|
|
"port": 8080,
|
|
"threaded": true,
|
|
"num_workers": 4,
|
|
"max_connections": 10000,
|
|
"timeout_ms": 30000,
|
|
"log_level": "info",
|
|
"gzip_enabled": true,
|
|
"brotli_enabled": true,
|
|
"access_log": "-"
|
|
}
|