layout.setLocationInfo(false);
logger.warn("warning dawg");
String message = appender.getMessages()[0];
Object obj = JSONValue.parse(message);
JSONObject jsonObject = (JSONObject) obj;
JSONObject atFields = (JSONObject) jsonObject.get("@fields");
Assert.assertFalse("atFields contains file value", atFields.containsKey("file"));
Assert.assertFalse("atFields contains line_number value", atFields.containsKey("line_number"));
Assert.assertFalse("atFields contains class value", atFields.containsKey("class"));
Assert.assertFalse("atFields contains method value", atFields.containsKey("method"));
// Revert the change to the layout to leave it as we found it.
layout.setLocationInfo(prevLocationInfo);
}