carterkozak commented on pull request #454:
URL: https://github.com/apache/logging-log4j2/pull/454#issuecomment-752756805
I started reviewing this and realized I don't know as much as I should about
json-template-layout as a whole!
This feature has a lot in common with the additional fields component in
that it provides shorthand to avoid rewriting existing templates.
I wonder if it would be helpful to have a `templateUri` resolver that could
solve this in an admittedly more verbose way:
```json
{
"event": {
"$resolver": "templateUri",
"uri": "classpath:LogstashJsonEventLayoutV1.json"
}
}
```
I'm not suggesting against the current approach, just recording my thoughts.
What do you think?
I took a crack at implementing such a thing as an opportunity to explore JTL
[here](https://github.com/apache/logging-log4j2/compare/release-2.x...carterkozak:ckozak/nested_templates?expand=1).
I don't mind throwing away my code as the motivation was primarily
exploratory. The JTL code is a joy to work with :-)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]