1 /** 2 * Logback: the generic, reliable, fast and flexible logging framework. 3 * 4 * Copyright (C) 1999-2006, QOS.ch 5 * 6 * This library is free software, you can redistribute it and/or modify it under 7 * the terms of the GNU Lesser General Public License as published by the Free 8 * Software Foundation. 9 */ 10 package chapter1; 11 12 import org.slf4j.Logger; 13 import org.slf4j.LoggerFactory; 14 import ch.qos.logback.classic.LoggerContext; 15 import ch.qos.logback.core.util.StatusPrinter; 16 17 public class HelloWorld2 { 18 19 public static void main(String[] args) { 20 Logger logger = LoggerFactory.getLogger("chapter1.HelloWorld2"); 21 logger.debug("Hello world."); 22 23 // print internal state 24 LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory(); 25 StatusPrinter.print(lc); 26 } 27 }