Replies: 2 comments 2 replies
-
Could you provide us some example use cases? Do you have a particular
need/problem that you are trying to address?
|
Beta Was this translation helpful? Give feedback.
1 reply
-
I strongly discourage you from using Pattern Layout for structured
logging[1] purposes. What if thread name contains a newline character? Or
level? PL will easily fall short on adressing such corner cases, neither it
was intended to do so. You are using the wrong tool. You should rather
employ JSON Template Layout for structured logging. It is not only super
customizable and efficient, it is designed with machine-to-machine
communication (e.g., Filebeat feed) in mind.
[1]
https://logging.staged.apache.org/log4j/2.x/manual/layouts.html#structured-logging
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
lw33
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I think supporting patterns would make it more flexible and useful.
Beta Was this translation helpful? Give feedback.
All reactions