ch.qos.logback.classic.net.SimpleSocketServer Maven / Gradle / Ivy
/**
* Logback: the reliable, generic, fast and flexible logging framework.
* Copyright (C) 1999-2011, QOS.ch. 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.net;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.joran.JoranConfigurator;
import ch.qos.logback.core.joran.spi.JoranException;
/**
* A simple {@link SocketNode} based server.
*
*
* <b>Usage:</b> java ch.qos.logback.classic.net.SimpleSocketServer port configFile
*
*
* where port is a port number where the server listens and
* configFile is an xml configuration file fed to
* {@link JoranConfigurator}.
*
*
*
* @author Ceki Gülcü
* @author Sébastien Pennec
*
* @since 0.8.4
*/
public class SimpleSocketServer extends Thread {
Logger logger = LoggerFactory.getLogger(SimpleSocketServer.class);
private final int port;
private final LoggerContext lc;
private boolean closed = false;
private ServerSocket serverSocket;
private List© 2015 - 2025 Weber Informatics LLC | Privacy Policy