Package org.jwebsocket.config

Examples of org.jwebsocket.config.LoggingConfig


  /**
   * {@inheritDoc}
   */
  @Override
  public void initializeLogging() {
    LoggingConfig lLoggingConfig = mConfig.getLoggingConfig();
    // initialize log4j logging engine
    // BEFORE instantiating any jWebSocket classes
    Logging.initLogs(lLoggingConfig.getLevel(), lLoggingConfig.getAppender(),
        lLoggingConfig.getFilename(), lLoggingConfig.getPattern(),
        lLoggingConfig.getBufferSize(),
        new String[]{"%JWEBSOCKET_HOME%/logs", "%CATALINA_HOME%/logs"});
    mLog = Logging.getLogger(JWebSocketXmlConfigInitializer.class);
    if (mLog.isDebugEnabled()) {
      mLog.debug("Logging settings"
          + ": appender: " + lLoggingConfig.getAppender()
          + ", filename: " + lLoggingConfig.getFilename()
          + ", level: " + lLoggingConfig.getLevel()
          + ", buffersize: " + lLoggingConfig.getBufferSize()
          + ", pattern: " + lLoggingConfig.getPattern());
    }
    if (mLog.isDebugEnabled()) {
      mLog.debug("Starting jWebSocket Server Sub System...");
    }
  }
View Full Code Here


    System.out.println("jWebSocket Ver. " + JWebSocketServerConstants.VERSION_STR + " (" + System.getProperty("sun.arch.data.model") + "bit)");
    System.out.println(JWebSocketCommonConstants.COPYRIGHT);
    System.out.println(JWebSocketCommonConstants.LICENSE);

    // initialize the logging system
    LoggingConfig lLoggingConfig = new LoggingConfig(
        "console", // target
        "%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p - %C{1}: %m%n", // pattern
        "debug", // level
        "jWebSocket.log", // file name, if logging to file only
        4096 // bufferSize, if logging to file only
View Full Code Here

        while (streamReader.hasNext()) {
            streamReader.next();
            if (streamReader.isStartElement()) {
                String elementName = streamReader.getLocalName();
                if (elementName.equals(ELEMENT_LOG4J)) {
                    LoggingConfig loggingConfig = (LoggingConfig) handlerContext.get(elementName).processConfig(streamReader);
                    loggingConfigs.add(loggingConfig);
                }
            }
            if (streamReader.isEndElement()) {
                String elementName = streamReader.getLocalName();
View Full Code Here

TOP

Related Classes of org.jwebsocket.config.LoggingConfig

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.