title: Property objectMessageAsJsonObject="true" in log42.xml (jsonLayout) doesn't work with netty server (webflux). With tomcat server, it works
body: <p>I am setting my application logs to be painted in JSON format. In the log4j2.xml file, I have the following configuration for my appender:</p>
  <pre><code>&lt;JsonLayout complete=&quot;false&quot; compact=&quot;true&quot; eventEol=&quot;true&quot; includeTimeMillis=&quot;true&quot; includeStacktrace=&quot;true&quot; objectMessageAsJsonObject=&quot;true&quot;&gt;
  &lt;/JsonLayout&gt;
  </code></pre>
  <p>With the property <strong>objectMessageAsJsonObject = &quot;true&quot;</strong>, I am stating that if an attribute of a printed log is an object, paint it as JSON.</p>
  <p>My problem is that it doesn't paint it as json, it paints it as json but in string form:</p>
  <p>Example: <strong>(Look at the message attribute)</strong></p>
  <pre><code>{&quot;timeMillis&quot;:1637633364457,&quot;thread&quot;:&quot;reactor-http-epoll-1&quot;,&quot;level&quot;:&quot;DEBUG&quot;,&quot;loggerName&quot;:&quot;es.example.controller.HelloWorldController&quot;,&quot;message&quot;:&quot;{\&quot;name\&quot;:\&quot;Josué\&quot;}&quot; ... }
  </code></pre>
  <p>I am using <strong>webflux</strong> and the embedded server it uses is netty. I have observed that if I <strong>exclude the netty server</strong> and <strong>include the tomcat server</strong>, the attributes that are objects are correctly painted as JSON.</p>
  <p>In the pom.xml I am excluding the spring-boot-starter-logging artifact and adding the spring-boot-starter-log4j2 dependency, as indicated in all guides.</p>
  <p>Anyone know how to get it to work properly with the netty server? Thanks in advance.</p>