Replies: 3 comments
-
JSON Template Layout does not print the location by default. You need to set its <JsonTemplateLayout eventTemplateUri="classpath:test.json"
locationInfoEnabled="true"/> Due to #1692, you also need to upgrade to version 2.21.0 or later, since the bug prevents location information from being computed for some method calls. |
Beta Was this translation helpful? Give feedback.
-
Also, can't JSON templates use the 'ThreadContext'? I found that the '%X' in the template is invalid. |
Beta Was this translation helpful? Give feedback.
-
See this answer. |
Beta Was this translation helpful? Give feedback.
-
Description
Using JSON layout and configuring line numbers, but not in the file, but the console can display.
Configuration
Version: 2.17.2
Operating system: macOS Sonoma 14.6
JDK: 8
Logs
Reproduction
The example project is as follows:
no-line-number.zip
Beta Was this translation helpful? Give feedback.
All reactions