Commit dde59a5
committed
fix: process log messages as templates independently of response
Based on the documentation, log messages should always be processed
through the template engine, regardless of whether the response has
template=true. The documentation shows an interceptor example with
placeholders in the log message but no template flag on the response:
```yaml
log: "User accessed ${context.request.headers.User-Agent}"
response:
statusCode: 401
content: "Unauthorized"
# Note: no template: true
```
Changes:
- Log messages are now always processed through PlaceholderUtil
- Removed template: true from test config (not needed for logs)
- Fixed wildcard import in AbstractResourceConfig
This allows log messages to use placeholders independently of whether
the response content uses templating.1 parent f0f934d commit dde59a5
File tree
1 file changed
+4
-7
lines changed- core/engine/src/main/java/io/gatehill/imposter/service
1 file changed
+4
-7
lines changedLines changed: 4 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
| 231 | + | |
232 | 232 | | |
| 233 | + | |
233 | 234 | | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
| 235 | + | |
239 | 236 | | |
240 | 237 | | |
241 | | - | |
| 238 | + | |
242 | 239 | | |
243 | 240 | | |
244 | 241 | | |
| |||
0 commit comments