Package java.util.logging

Examples of java.util.logging.Level.intValue()


  }

  public Level setLevel(final String iLevel, final Class<? extends Handler> iHandler) {
    final Level level = iLevel != null ? Level.parse(iLevel.toUpperCase()) : Level.INFO;

    if (level.intValue() < minimumLevel.intValue()) {
      // UPDATE MINIMUM LEVEL
      minimumLevel = level;

      if (level.equals(Level.FINER) || level.equals(Level.FINE) || level.equals(Level.FINEST))
        debug = info = warn = error = true;
View Full Code Here


  /*
   * Test method parse, with an undefined valid number strings.
   */
  public void testParse_UndefinedNumber() {
    Level l = Level.parse("0");
    assertEquals(0, l.intValue());
    assertEquals("0", l.getName());
    assertNull(l.getResourceBundleName());
  }

  /*
 
View Full Code Here

    }
  }

  public void testParse_NegativeNumber() {
    Level l = Level.parse("-4");
    assertEquals(-4, l.intValue());
    assertEquals("-4", l.getName());
    assertNull(l.getResourceBundleName());
  }

  /*
 
View Full Code Here

    @Override
    public void publish(LogRecord record)
    {
      Level level = record.getLevel();
      if(maxLevelVerbose != null && level.intValue() < maxLevelVerbose.intValue())
        return;

      Log log = getLog(record.getLoggerName());
      String message = record.getMessage();
      Throwable exception = record.getThrown();
View Full Code Here

                    stdOutHandler.setFormatter(new TerseFormatter(false));
                    stdOutHandler.setFilter(new MaxLevelFilter(Level.INFO));
                    stdOutHandler.setLevel(originalLevel);
                    logger.addHandler(stdOutHandler);
                    if (isDebugMode()) {
                        if (originalLevel.intValue() > Level.FINE.intValue()) {
                            stdOutHandler.setLevel(Level.FINE);
                        }
                    }
                }
            }
View Full Code Here

           
            // See 6316018. ClassName and MethodName information should be
            // included for FINER and FINEST log levels.
            Level level = record.getLevel();
            if (LOG_SOURCE_IN_KEY_VALUE ||
                    (level.intValue() <= Level.FINE.intValue())) {
                recordBuffer.append("ClassName").append(NV_SEPARATOR);
                recordBuffer.append(record.getSourceClassName());
                recordBuffer.append(NVPAIR_SEPARATOR);
                recordBuffer.append("MethodName").append(NV_SEPARATOR);
                recordBuffer.append(record.getSourceMethodName());
View Full Code Here

                    // See 6316018. ClassName and MethodName information should be
                    // included for FINER and FINEST log levels.
                    Level level = record.getLevel();

                    if (LOG_SOURCE_IN_KEY_VALUE ||
                            (level.intValue() <= Level.FINE.intValue())) {
                        recordBuffer.append("ClassName").append(NV_SEPARATOR);
                        recordBuffer.append(record.getSourceClassName());
                        recordBuffer.append(NVPAIR_SEPARATOR);
                        recordBuffer.append("MethodName").append(NV_SEPARATOR);
                        recordBuffer.append(record.getSourceMethodName());
View Full Code Here

           
            // Include the integer level value in the log
            Level level = record.getLevel();
            if (!excludeFieldsSupport.isSet(ExcludeFieldsSupport.SupplementalAttribute.LEVEL_VALUE)) {
                recordBuffer.append("_LevelValue").append(NV_SEPARATOR);
                int levelValue = level.intValue();
                logEvent.setLevelValue(levelValue);
                recordBuffer.append(levelValue).append(NVPAIR_SEPARATOR);               
            }
           
            String msgId = getMessageId(record);
View Full Code Here

            }

            // See 6316018. ClassName and MethodName information should be
            // included for FINER and FINEST log levels.
            if (LOG_SOURCE_IN_KEY_VALUE ||
                    (level.intValue() <= Level.FINE.intValue())) {
                String sourceClassName = record.getSourceClassName();
                // sourceClassName = (sourceClassName == null) ? "" : sourceClassName;
                if (sourceClassName != null && !sourceClassName.isEmpty()) {
                    recordBuffer.append(CLASS_NAME).append(NV_SEPARATOR);
                    logEvent.getSupplementalAttributes().put(CLASS_NAME, sourceClassName);
View Full Code Here

      Object tag = null;
      if (level == Level.WARNING) {
        tag = Redwood.WARN;
      } else if (level == Level.SEVERE) {
        tag = Redwood.ERR;
      } else if (level.intValue() <= Level.FINE.intValue()) {
        tag = Redwood.DBG;
      }

      if (tag == null) {
        Redwood.log(message);
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.