Package org.apache.log4j.net

Examples of org.apache.log4j.net.SyslogAppender


  @Test
  public void testAppend() throws InterruptedException {
    Logger logger = Logger.getLogger(getClass());
    // use the Apache syslog appender to write to syslog source
    SyslogAppender appender = new SyslogAppender(null,
        "localhost:"+TEST_SYSLOG_PORT, SyslogAppender.LOG_FTP);
    logger.addAppender(appender);
    Event e = null;

    source.start();
View Full Code Here


        if (syslogHost == null || syslogHost.trim().equals("") )
        {
            return;
        }

        Appender appender = new SyslogAppender(layout, syslogHost, logLevel);
        logger.addAppender(appender);
    }
View Full Code Here

*/
public class WrappedSyslogAppender extends AppenderSkeleton {
  SyslogAppender syslog;

  public WrappedSyslogAppender() {
    syslog = new SyslogAppender();
    syslog.setFacility("LOCAL1");
    syslog.setSyslogHost("localhost");
  }
View Full Code Here

        if (syslogHost == null || syslogHost.trim().equals("") )
        {
            return;
        }

        Appender appender = new SyslogAppender(layout, syslogHost, logLevel);
        logger.addAppender(appender);
    }
View Full Code Here

            errorHandler.error(" Invalid format for the IP Addresses parameter ");
            return;
        }

        for (String syslogHost : _syslogHostsList) {
            _syslogAppenders.add(new SyslogAppender(getLayout(), syslogHost, SyslogAppender.getFacility(_facility)));
        }
    }
View Full Code Here

        if (syslogHost == null || syslogHost.trim().equals("") )
        {
            return;
        }

        Appender appender = new SyslogAppender(layout, syslogHost, logLevel);
        logger.addAppender(appender);
    }
View Full Code Here

TOP

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

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.