final PatternFormatter appformatter = new PatternFormatter(prop
.getProperty("logs.pattern.application"));
LogTarget[] appLoggerTargets = new LogTarget[writeToFile ? 2 : 1];
appLoggerTargets[0] = new WriterTarget(new PrintWriter(System.out),
appformatter);
if (writeToFile) {
// open file target in append mode
final File appfile = new File(prop.getProperty("logs.dir")
+ File.separator + IConst.LOG.APPLICATION_LOG_NAME);