buf.append("\" file=\"?\" line=\"?\"/>\r\n");
}
if (properties) {
if (MDC.getMDCAdapter() instanceof BasicMDCAdapter) {
BasicMDCAdapter mdcAdapter = (BasicMDCAdapter) MDC.getMDCAdapter();
Set keySet = mdcAdapter.getKeys();
if (keySet != null && keySet.size() > 0) {
buf.append("<log4j:properties>\r\n");
Object[] keys = keySet.toArray();
Arrays.sort(keys);
for (Object key1 : keys) {
String key = key1.toString();
Object val = mdcAdapter.get(key);
if (val != null) {
buf.append("<log4j:data name=\"");
buf.append(Transform.escapeTags(key));
buf.append("\" value=\"");
buf.append(Transform.escapeTags(String.valueOf(val)));