Examples of LogLevel


Examples of com.alu.e3.data.model.LogLevel

   *
   * @param event  A LogLevel-specific event from the DataManager
   */
  private void handleLogLevelEvent(DataEntryEvent<String, LogLevel> event) {
    String eventKey = event.getKey();
    LogLevel logLevel = event.getValue();
    if ((eventKey == null) || (logLevel == null)) {
      return;
    }
    // TODO:
    // The logLevelParameter idea is not yet implemented, but will be the way we will
    // distinguish instance-specific set-level and get-level events
    // (To be implemented when the concept of InstanceIDs is sorted out)
    String[] keyAndParam = eventKey.split(":", 2);
    String key = keyAndParam.length > 0 ? keyAndParam[0] : "";
    String param = keyAndParam.length > 1 ? keyAndParam[1] : "";
    logger.debug("Parsed cached log-level event key: '{}' and param: '{}'", key, param);
    if (key.equals(LogLevel.logLevelKey)) {
      logger.debug("New java log-level notification: ({}, {})", eventKey, event.getValue());
      logger.debug("Setting local java log-level to new (global) value: {}", logLevel.toString());
      try {
        LoggingUtil.setLocalLogLevel(LogFileSource.JAVA, logLevel);
      } catch (Exception ex) {
        logger.error("Unable to set logLevel from cache: {}", logLevel.toString());
      }
    } else if (key.equals(LogLevel.smxlogLevelKey)) {
      logger.debug("New smxlog-level notification: ({}, {})", eventKey, event.getValue());
      logger.debug("Setting local smxlog-level to new (global) value: {}", logLevel.toString());
      try {
        LoggingUtil.setLocalLogLevel(LogFileSource.SMX, logLevel);
      } catch (Exception ex) {
        logger.error("Unable to set smxlogLevel from cache: {}", logLevel.toString());
      }
    } else if (key.equals(LogLevel.syslogLevelKey)) {
      logger.debug("New syslog-level notification: ({}, {})", eventKey, event.getValue());
      String syslogLevel = logLevel.getSyslogLevel().name();
      logger.debug("Setting local syslog-level to new (global) value: {}", syslogLevel);
      try {
        NonJavaLogger.setLogLevel(syslogLevel);
      } catch (Exception ex) {
        logger.error("Unable to set syslogLevel from cache: {}", syslogLevel);
      }
    } else {
      // Check if this is a logging-category specification
      Category category = Category.fromString(key);
      if (category != null) {
        logger.debug("New category-enabled notification: ({}, {})", eventKey, event.getValue());
        // If the log-level value is log4j OFF, then the category is disabled; else, category is enabled
        if (logLevel.getLevel().equals(Level.OFF)) {
          logger.debug("Disabling logging category: {}", category);
          Category.enableCategory(category, false);
        } else {
          logger.debug("Enabling logging category: {}", category);
          Category.enableCategory(category, true);
View Full Code Here

Examples of com.cloud.agent.api.LogLevel

    public boolean shouldSkipClass(Class<?> clazz) {
        if (clazz.isArray() || !Command.class.isAssignableFrom(clazz)) {
            return false;
        }
        Log4jLevel log4jLevel = null;
        LogLevel level = clazz.getAnnotation(LogLevel.class);
        if (level == null) {
            log4jLevel = LogLevel.Log4jLevel.Debug;
        } else {
            log4jLevel = level.value();
        }

        return !log4jLevel.enabled(_logger);
    }
View Full Code Here

Examples of com.cloud.agent.api.LogLevel

        return !log4jLevel.enabled(_logger);
    }

    @Override
    public boolean shouldSkipField(FieldAttributes field) {
        LogLevel level = field.getAnnotation(LogLevel.class);
        return level != null && !level.value().enabled(_logger);
    }
View Full Code Here

Examples of com.cloud.agent.api.LogLevel

    public boolean shouldSkipClass(Class<?> clazz) {
        if (clazz.isArray() || !Command.class.isAssignableFrom(clazz)) {
            return false;
        }
        Log4jLevel log4jLevel = null;
        LogLevel level = clazz.getAnnotation(LogLevel.class);
        if (level == null) {
            log4jLevel = LogLevel.Log4jLevel.Debug;
        } else {
            log4jLevel = level.value();
        }

        return !log4jLevel.enabled(_logger);
    }
View Full Code Here

Examples of com.cloud.agent.api.LogLevel

        return !log4jLevel.enabled(_logger);
    }

    @Override
    public boolean shouldSkipField(FieldAttributes field) {
        LogLevel level = field.getAnnotation(LogLevel.class);
        return level != null && !level.value().enabled(_logger);
    }
View Full Code Here

Examples of com.crashnote.core.model.types.LogLevel

        logger.debug("resolved POST target URL: {}", url);
        return url;
    }

    public LogLevel getLogLevel() {
        final LogLevel maxLvl = LogLevel.INFO;
        final LogLevel reportLvl = getReportLogLevel();
        //final LogLevel historyLvl = getReportHistoryLevel();
        return LogLevel.getMaxLevel(maxLvl, reportLvl);
    }
View Full Code Here

Examples of com.google.appengine.api.log.LogService.LogLevel

    setInstanceKey(requestLog.getCloneKey());
    setAppEngineRelease(requestLog.getAppEngineRelease());

    List<AppLogLine> appLogLines = getAppLogLines();
    for (LogLine logLine : requestLog.lines()) {
      LogLevel level = LogLevel.values()[logLine.getLevel()];

      appLogLines.add(new AppLogLine(logLine.getTime(), level,
            logLine.getLogMessage()));
    }
  }
View Full Code Here

Examples of com.google.appengine.api.log.LogService.LogLevel

    setInstanceKey(requestLog.getCloneKey());
    setAppEngineRelease(requestLog.getAppEngineRelease());

    List<AppLogLine> appLogLines = getAppLogLines();
    for (LogLine logLine : requestLog.lines()) {
      LogLevel level = LogLevel.values()[logLine.getLevel()];

      appLogLines.add(new AppLogLine(logLine.getTime(), level,
            logLine.getLogMessage()));
    }
  }
View Full Code Here

Examples of com.ketayao.ketacustom.log.LogLevel

      new Thread(new Runnable() {
       
        @Override
        public void run() {
          try {
            LogLevel lastLogLevel = logAPI.getRootLogLevel();
           
            // 先对自定义包等级做判断
            Map<String, LogLevel> customLogLevel = logAPI.getCustomLogLevel();
            if (!customLogLevel.isEmpty()) {
              Class<?> clazz = handlerMethod.getBean().getClass();
View Full Code Here

Examples of com.mucommander.MuLogging.LogLevel

     * @return a panel containing the level combo box and a leading localized label describing it
     */
    private JPanel createComboPanel() {
        JPanel comboPanel = new JPanel(new FlowLayout());
        comboPanel.add(new JLabel(Translator.get("debug_console_dialog.level")+":"));
        LogLevel logLevel = MuLogging.getLogLevel();

        levelComboBox = new JComboBox();
        for(LogLevel level:LogLevel.values())
            levelComboBox.addItem(level);
           
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.