Hierarchy.getDefaultHierarchy().setDefaultLogTarget(servTarget);
Hierarchy.getDefaultHierarchy().setDefaultPriority(logPriority);
final Logger logger = Hierarchy.getDefaultHierarchy().getLoggerFor("");
final DefaultLogKitManager logKitManager = new DefaultLogKitManager(Hierarchy.getDefaultHierarchy());
logKitManager.setLogger(logger);
final DefaultContext subcontext = new DefaultContext(this.appContext);
subcontext.put("servlet-context", this.servletContext);
if (this.servletContextPath == null) {
File logSCDir = new File(this.workDir, "log");
logSCDir.mkdirs();
if (logger.isWarnEnabled()) {
logger.warn("Setting servlet-context for LogKit to " + logSCDir);
}
subcontext.put("context-root", logSCDir.toString());
} else {
subcontext.put("context-root", this.servletContextPath);
}
try {
logKitManager.contextualize(subcontext);
this.logKitManager = logKitManager;