(req: Request, config: ServerConfig)
| 262 | } |
| 263 | |
| 264 | function requestLogFields(req: Request, config: ServerConfig): Record<string, unknown> { |
| 265 | return { |
| 266 | ip: requestIp(req, config.logging.trustProxy), |
| 267 | host: req.header("host"), |
| 268 | userAgent: req.header("user-agent"), |
| 269 | origin: req.header("origin"), |
| 270 | referer: req.header("referer"), |
| 271 | contentLength: req.header("content-length"), |
| 272 | }; |
| 273 | } |
| 274 | |
| 275 | function logToolCall(config: ServerConfig, fields: ToolLogFields): void { |
| 276 | if (!config.logging.toolCalls) return; |
no test coverage detected