Examples of activateOptions()


Examples of com.cisco.oss.foundation.logging.appender.FoundationFileRollingAppender.activateOptions()

      }

      timeSizeRollingAppender.setRollOnStartup(rollOnStartup);

      // refresh the appender
      timeSizeRollingAppender.activateOptions();

     
    //  timeSizeRollingAppender.setOriginalLayout(); //So application state will not make any problems

    }else if(!(appender instanceof FoundationFileRollingAppender) && (appender instanceof TimeAndSizeRollingAppender)){ //TimeAndSizeRollingAppender
View Full Code Here

Examples of com.codahale.metrics.log4j.InstrumentedAppender.activateOptions()

        // Report metrics via JMX.
        final JmxReporter reporter = JmxReporter.forRegistry(metrics).build();
        reporter.start();

        InstrumentedAppender logMetrics = new InstrumentedAppender(metrics);
        logMetrics.activateOptions();
        org.apache.log4j.Logger.getRootLogger().setLevel(logLevel);
        org.apache.log4j.Logger.getLogger(Main.class.getPackage().getName()).setLevel(logLevel);
        org.apache.log4j.Logger.getRootLogger().addAppender(logMetrics);

        SLF4JBridgeHandler.removeHandlersForRootLogger();
View Full Code Here

Examples of com.codahale.metrics.log4j.InstrumentedAppender.activateOptions()

        // Report metrics via JMX.
        final JmxReporter reporter = JmxReporter.forRegistry(metrics).build();
        reporter.start();

        InstrumentedAppender logMetrics = new InstrumentedAppender(metrics);
        logMetrics.activateOptions();
        org.apache.log4j.Logger.getRootLogger().addAppender(logMetrics);

        SLF4JBridgeHandler.removeHandlersForRootLogger();
        SLF4JBridgeHandler.install();
View Full Code Here

Examples of com.taobao.tddl.common.monitor.DailyMaxRollingFileAppender.activateOptions()

    appender.setEncoding("GBK");
    appender.setLayout(new PatternLayout(pattern));
    appender.setDatePattern("'.'yyyy-MM-dd-HH");
    appender.setMaxBackupIndex(6);
    appender.setFile(new File(getLogPath(), fileName).getAbsolutePath());
    appender.activateOptions();// ����Ҫ������ԭ����־���ݻᱻ���
    return appender;
  }
 
  private static Appender buildMatrixStaticAppender(String name, String fileName, String pattern){
    DailyMaxRollingFileAppender appender = new DailyMaxRollingFileAppender();
View Full Code Here

Examples of org.apache.log4j.Appender.activateOptions()

      appender.setMaxFileSize(DEF_APPENDER_MAXFILESIZE);
      appender.setMaxBackupIndex(DEF_APPENDER_MAXBACKUP);
      PatternLayout layout = new PatternLayout(DEF_APPENDER_PATTERN);
      appender.setLayout(layout);
      appender.setFile(filename);
      appender.activateOptions();
      //add into the logger
      logger.addAppender(appender);
    }
   
    //keep the logfile name
View Full Code Here

Examples of org.apache.log4j.AppenderSkeleton.activateOptions()

            // set the threshold
            if (appender instanceof AppenderSkeleton) {
                AppenderSkeleton appenderSkeleton = (AppenderSkeleton) appender;
                appenderSkeleton.setThreshold(Level.toLevel(threshold));
                appenderSkeleton.activateOptions();
            }
        }
    }
   
    public boolean isStratosService() throws Exception {
View Full Code Here

Examples of org.apache.log4j.AppenderSkeleton.activateOptions()

        for(Appender appender:appenderSet){
            if (appender instanceof AppenderSkeleton) {
                AppenderSkeleton appenderSkeleton = (AppenderSkeleton) appender;
                appenderSkeleton.setThreshold(systemLevel);
                appenderSkeleton.setLayout(patternLayout);
                appenderSkeleton.activateOptions();
            }
        }

        // update the appender data stored in the registry
        Collection appenderCollection = registryManager.getAppenders();
View Full Code Here

Examples of org.apache.log4j.AppenderSkeleton.activateOptions()

      for (Appender appender : appenderSet) {
        if (appender instanceof AppenderSkeleton) {
          AppenderSkeleton appenderSkeleton = (AppenderSkeleton) appender;
          appenderSkeleton.setThreshold(systemLevel);
          appenderSkeleton.activateOptions();
        }
      }
    }

    // Update the logger data according to the data stored in the registry.
View Full Code Here

Examples of org.apache.log4j.AppenderSkeleton.activateOptions()

          if (appender instanceof AppenderSkeleton) {
            AppenderSkeleton appenderSkeleton = (AppenderSkeleton) appender;
            appenderSkeleton.setThreshold(Level.toLevel(appenderResource
                .getProperty(LoggingConstants.AppenderProperties.THRESHOLD)));
            appenderSkeleton.activateOptions();
          }
        }
      }
    }
  }
View Full Code Here

Examples of org.apache.log4j.AsyncAppender.activateOptions()

    //  wrap SyslogAppender with an Async since appender may
    //    hang if syslogd is not accepting network messages
    //
    AsyncAppender asyncAppender = new AsyncAppender();
    asyncAppender.addAppender(appender);
    asyncAppender.activateOptions();

    Logger logger = Logger.getRootLogger();
    logger.addAppender(asyncAppender);

    Exception e =
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.