Closed jbonofre closed 2 years ago
Other additional log4j-* artifacts could be included this way.
Thanks @svogt for the PR! I've added an integration test for this layout. Here's properties-based configuration:
json.template.log4j2.appender.file.type = File
json.template.log4j2.appender.file.name = file
json.template.log4j2.appender.file.fileName = target/logs-log4j2/json-template.log
json.template.log4j2.appender.file.append = true
json.template.log4j2.appender.file.layout.type = JsonTemplateLayout
json.template.log4j2.appender.file.layout.eventTemplateUri = ${karaf.etc.uri}/logging-template.json
json.template.log4j2.rootLogger.level = info
json.template.log4j2.rootLogger.appenderRef.file.ref = file
Backports:
We just have to include a new log4j artifact in the wrapping (no additional dependency should be required).