001/** 002 * Logback: the reliable, generic, fast and flexible logging framework. 003 * Copyright (C) 1999-2015, QOS.ch. All rights reserved. 004 * 005 * This program and the accompanying materials are dual-licensed under 006 * either the terms of the Eclipse Public License v1.0 as published by 007 * the Eclipse Foundation 008 * 009 * or (per the licensee's choosing) 010 * 011 * under the terms of the GNU Lesser General Public License version 2.1 012 * as published by the Free Software Foundation. 013 */ 014package ch.qos.logback.classic.issue.lbcore_155; 015 016import ch.qos.logback.classic.Logger; 017import ch.qos.logback.classic.LoggerContext; 018import ch.qos.logback.core.util.StatusPrinter; 019import org.slf4j.LoggerFactory; 020 021/** 022 * @author Ceki Gülcü 023 */ 024public class Main { 025 026 public static void main(String[] args) throws InterruptedException { 027 028 Logger logger = (Logger) LoggerFactory.getLogger(Main.class); 029 StatusPrinter.print((LoggerContext) LoggerFactory.getILoggerFactory()); 030 OThread ot = new OThread(); 031 ot.start(); 032 Thread.sleep(OThread.WAIT_MILLIS - 500); 033 logger.info("About to interrupt"); 034 ot.interrupt(); 035 logger.info("After interrupt"); 036 logger.info("Leaving main"); 037 038 } 039}