Do we have Layout Pattern tag support for OpenTelemetryAppender in logback file? #11695
Unanswered
ff-amarkande
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Team,
Trying to format the log message with custom layout for example, refer following logback file
Custom layout code - Created CustomPatternLayout class for formatting by extending PatternLayout class
Code
`public class CustomMessageConverter
extends MessageConverter {
However when tried with OpenTelemetryAppender , log message is not formatted as per the layout.
Excepted
2024-06-28 12:59:51,360 INFO [localhost-startStop-1] EventLogger[SystemInfoProvider.java:54] [ requestId=Test-123] [eventChannel=CONFIGURATION, eventId=SYSTEM_INFO, message="Event to indicate system information", machineId=machine-id-1]
Actual
Event to indicate system information
Following is custom message formed inside getFormattedMessage method
[eventChannel=CONFIGURATION, eventId=SYSTEM_INFO, message="Event to indicate system information", machineId=machine-id-1]
Beta Was this translation helpful? Give feedback.
All reactions