final Priority logPriority = Priority.getPriorityForName(logLevel);
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 );
servTarget.setFormatter(formatter);
final Hierarchy defaultHierarchy = Hierarchy.getDefaultHierarchy();
final ErrorHandler errorHandler = new DefaultErrorHandler();
defaultHierarchy.setErrorHandler(errorHandler );
defaultHierarchy.setDefaultLogTarget(servTarget);