use of org.apache.log4j.TTCCLayout in project wso2-axis2-transports by wso2.
the class LogManager method setTestCase.
public void setTestCase(ManagedTestCase testCase) throws IOException {
if (appender != null) {
Logger.getRootLogger().removeAppender(appender);
appender.close();
appender = null;
}
if (logs != null) {
for (OutputStream log : logs) {
IOUtils.closeQuietly(log);
}
logs = null;
}
if (testCase == null) {
testCaseDir = null;
} else {
File testSuiteDir = new File(logDir, testCase.getTestClass().getName());
testCaseDir = new File(testSuiteDir, testCase.getId());
logs = new LinkedList<OutputStream>();
sequence = 1;
appender = new WriterAppender(new TTCCLayout(), createLog("debug"));
Logger.getRootLogger().addAppender(appender);
}
}
Aggregations