Hi Christopher, At least in my experience, I haven't any issues when logging JSON messages using PatternLayout. What other things should we consider apart from this?
--Ganapati On Wed, Nov 16, 2022 at 10:39 PM Christopher Schultz < ch...@christopherschultz.net> wrote: > Ganapati, > > On 11/16/22 05:54, Ganapathi Vara Prasad wrote: > > Hello Team, > > > > Our log4j2 configuration uses *PatternLayout* and we are exploring > > switching to JsonLayout for simplifying integration with ELK. I am trying > > to find any performance comparison between pattern and json layouts but > > couldn't find any. I could find only the JsonTemplateLayout benchmark in > > the log4j-perf module. > > > > I wanted to know: > > > > - Is it a reasonable thing to compare the performance of these two > > layouts? > > - Are there any existing resources comparing the performance of these > > two layouts? > > - What considerations should we make if we switch to > JsonTemplateLayout? > > Is it even possible to use PatternLayout safely with JSON-encoded data? > What if you log a username which contains a " character? Won't that > completely break your JSON? > > I think performance shouldn't be your primary consideration, here. > > -chris > > --------------------------------------------------------------------- > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-user-h...@logging.apache.org > >