public void testMDCEscaped() throws Exception {
XMLLayout xmlLayout = new XMLLayout();
xmlLayout.setProperties(true);
root.addAppender(new FileAppender(xmlLayout, TEMP, false));
Hashtable context = MDC.getContext();
if (context != null) {
context.clear();
}
MDC.put("blahAttribute", "<blah value='blah'>");
MDC.put("<blahKey value='blah'/>", "blahValue");
logger.debug("Hello");
Transformer.transform(
TEMP, FILTERED,
new Filter[] { new LineNumberFilter(),
new JunitTestRunnerFilter(),
new XMLTimestampFilter() });
assertTrue(Compare.compare(FILTERED, "witness/xmlLayout.mdc.2"));
}
XMLLayoutTestCase.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:cacheonix-core
作者:
评论列表
文章目录