Package org.apache.log4j.net

Examples of org.apache.log4j.net.SocketAppender


        int remotePort=loggingConfig.getRemotePort();
        if (remoteHost == null || remoteHost.trim().equals("") || remotePort <= 0)
        {
            return;
        }
        Appender appender = new SocketAppender(remoteHost, remotePort);
        logger.addAppender(appender);
    }
View Full Code Here


    Logger root = Logger.getRootLogger();
    BasicConfigurator.configure();
    try {
      int port   = Integer.parseInt(portStr);
      cat.info("Creating socket appender ("+host+","+port+").");
      s = new SocketAppender(host, port);
      s.setName("S");
      root.addAppender(s);
    }
    catch(java.lang.NumberFormatException e) {
      e.printStackTrace();
View Full Code Here

    }
    catch (NumberFormatException e) {
        usage("Argument [" + args[1+ "] is not in proper int form.");
    }

    SocketAppender sa = new SocketAppender(host, port);
    Layout layout = new PatternLayout("%5p [%t] %x %c - %m\n");
    Appender so = new ConsoleAppender(layout, "System.out");
    root.addAppender(sa);
    root.addAppender(so);
View Full Code Here

    Logger root = Logger.getRootLogger();
    BasicConfigurator.configure();
    try {
      int port   = Integer.parseInt(portStr);
      cat.info("Creating socket appender ("+host+","+port+").");
      s = new SocketAppender(host, port);
      s.setName("S");
      root.addAppender(s);
    }
    catch(java.lang.NumberFormatException e) {
      e.printStackTrace();
View Full Code Here

    }
    catch (NumberFormatException e) {
        usage("Argument [" + args[1+ "] is not in proper int form.");
    }

    SocketAppender sa = new SocketAppender(host, port);
    Layout layout = new PatternLayout("%5p [%t] %x %c - %m\n");
    Appender so = new ConsoleAppender(layout, "System.out");
    root.addAppender(sa);
    root.addAppender(so);
View Full Code Here

        int remotePort=loggingConfig.getRemotePort();
        if (remoteHost == null || remoteHost.trim().equals("") || remotePort <= 0)
        {
            return;
        }
        Appender appender = new SocketAppender(remoteHost, remotePort);
        logger.addAppender(appender);
    }
View Full Code Here

    Logger root = Logger.getRootLogger();
    BasicConfigurator.configure();
    try {
      int port   = Integer.parseInt(portStr);
      logger.info("Creating socket appender ("+host+","+port+").");
      s = new SocketAppender(host, port);
      s.setName("S");
      root.addAppender(s);
    }
    catch(java.lang.NumberFormatException e) {
      e.printStackTrace();
View Full Code Here

    }
    catch (NumberFormatException e) {
        usage("Argument [" + args[1+ "] is not in proper int form.");
    }

    SocketAppender sa = new SocketAppender(host, port);
    Layout layout = new PatternLayout("%5p [%t] %x %c - %m\n");
    Appender so = new ConsoleAppender(layout, "System.out");
    root.addAppender(sa);
    root.addAppender(so);
View Full Code Here

    assert _socketAppender == null;

    IPreferenceStore store = Activator.getDefault().getPreferenceStore();
    String hostname = store.getString(LogController.SOCKET_APPENDER_HOST_NAME_KEY);
    int port = store.getInt(LogController.SOCKET_APPENDER_PORT_KEY);
    Logger.getRootLogger().addAppender( new SocketAppender(hostname, port));

    _socketAppender = new SocketAppender(hostname, port);
    Logger.getRootLogger().addAppender( _socketAppender );
  }
View Full Code Here

    Category root = Category.getRoot();
    BasicConfigurator.configure();
    try {
      int port   = Integer.parseInt(portStr);
      cat.info("Creating socket appender ("+host+","+port+").");
      s = new SocketAppender(host, port);
      s.setName("S");
      root.addAppender(s);
    }
    catch(java.lang.NumberFormatException e) {
      e.printStackTrace();
View Full Code Here

TOP

Related Classes of org.apache.log4j.net.SocketAppender

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.