Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Logback: the reliable, generic, fast and flexible logging framework. Copyright (C) 1999-2011, All rights reserved. This program and the accompanying materials are dual-licensed under either the terms of the Eclipse Public License v1.0 as published by the Eclipse Foundation or (per the licensee's choosing) under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation.
package ch.qos.logback.classic;
BasicConfigurator configures logback-classic by attaching a ch.qos.logback.core.ConsoleAppender to the root logger. The console appender's layout is set to a PatternLayout with the pattern "%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n".

Ceki Gulcu
public class BasicConfigurator {
  final static BasicConfigurator hiddenSingleton = new BasicConfigurator();
  private BasicConfigurator() {
  public static void configure(LoggerContext lc) {
    StatusManager sm = lc.getStatusManager();
    if(sm != null)  {
     sm.add(new InfoStatus("Setting up default configuration."lc));
    pl.setPattern("%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n");
    Logger rootLogger = lc.getLogger(.);
  public static void configureDefaultContext() {
    LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
New to GrepCode? Check out our FAQ X