My log4j configuration is: <JsonLayout complete="false" compact="true" eventEol="true" locationInfo="false" properties="true" propertiesAsList="true" objectMessageAsJsonObject="true"></JsonLayout>
Regardless of what I specify for objectMessageAsJsonObject, I cannot get it to produce JSON of the message: I am using org.apache.logging.log4j.scala.Logger. I tried with ObjectMessage and StringMapMessage scala> map res5: java.util.Map[String,String] = {key1=value1, key2=value2} logger.fatal(new StringMapMessage(map)) .... "message":"key1=\"value1\" key2=\"value2\"" It always prints the toString value and never the JSON value. What am I doing wrong? Thanks much --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org