final CocoonLogFormatter formatter = new CocoonLogFormatter();
formatter.setFormat("%7.7{priority} %{time} [%8.8{category}] " +
"(%{uri}) %{thread}/%{class:short}: %{message}\\n%{throwable}");
final ServletOutputLogTarget servTarget = new ServletOutputLogTarget(this.servletContext, formatter);
final Hierarchy defaultHierarchy = Hierarchy.getDefaultHierarchy();
final ErrorHandler errorHandler = new DefaultErrorHandler();
defaultHierarchy.setErrorHandler(errorHandler);
defaultHierarchy.setDefaultLogTarget(servTarget);
defaultHierarchy.setDefaultPriority(logPriority);
final Logger logger = new LogKitLogger(Hierarchy.getDefaultHierarchy().getLoggerFor(""));
final String loggerManagerClass =
this.getInitParameter("logger-class", LogKitLoggerManager.class.getName());
// the log4j support requires currently that the log4j system is already configured elsewhere