Package java.util.logging

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


        String level = req.getParameter("level");
        if(level!=null) {
            Level threshold = Level.parse(level);
            List<LogRecord> filtered = new ArrayList<LogRecord>();
            for (LogRecord r : logs) {
                if(r.getLevel().intValue() >= threshold.intValue())
                    filtered.add(r);
            }
            logs = filtered;
        }
View Full Code Here


     * @param record description of the log event
     */
    public void publish( LogRecord record )
    {
        Level level = record.getLevel();
        if( level.intValue() == Level.CONFIG.intValue() )
        {
            return;
        }
        String loggerName = record.getLoggerName();
        // TODO: Can't associate a bundle with the JDK logger. So how??
View Full Code Here

        String logLevelStr = configuration.getAttribute(LaunchConstants.ATTR_LOGLEVEL, (String) null);
        if (logLevelStr != null) {
            Plugin.getDefault().getLog()
                    .log(new Status(IStatus.WARNING, Plugin.PLUGIN_ID, 0, MessageFormat.format("The {0} attribute is no longer supported, use {1} instead.", LaunchConstants.ATTR_LOGLEVEL, LaunchConstants.ATTR_TRACE), null));
            Level logLevel = Level.parse(logLevelStr);
            launcher.setTrace(launcher.getTrace() || logLevel.intValue() <= Level.FINE.intValue());
        }
    }

    protected static MultiStatus createStatus(String message, List<String> errors, List<String> warnings) {
        MultiStatus status = new MultiStatus(Plugin.PLUGIN_ID, 0, message, null);
View Full Code Here

            lLevel = Level.WARNING;
        } else if(newLevel == LOG_ERROR_LEVEL)  {
            lLevel = Level.SEVERE;
        }

        if(lLevel != null  &&  lLevel.intValue() != currentLevel)  {
            resetLevels(getLogger(), lLevel);
        }
    }

    private void resetLevels(Logger loga, Level newLevel)  {
View Full Code Here

      _finestEffectiveLevelValue = newEffectiveLevel.intValue();
      super.setLevel(_finestEffectiveLevel);
    }
    */
   
    if (oldEffectiveLevel == newEffectiveLevel.intValue()
        && loader != _systemClassLoader)
      return;
   
    _finestEffectiveLevel = newEffectiveLevel;
    _hasLocalEffectiveLevel = false;
View Full Code Here

  {
    Level level = getOwnEffectiveLevel(loader);
   
    if (loader == _systemClassLoader) {
      _systemEffectiveLevelValue
        = (level != null ? level.intValue() : Level.INFO.intValue());
    }
   
    if (level == null) {
      if (_localEffectiveLevel != null)
        _localEffectiveLevel.remove(loader);
View Full Code Here

      return;
    }
   
    if (_finestEffectiveLevel == null)
      _finestEffectiveLevel = level;
    else if (level.intValue() < _finestEffectiveLevel.intValue()) {
      _finestEffectiveLevel = level;
    }
   
    if (loader == _systemClassLoader) {
      _systemEffectiveLevelValue = level.intValue();
View Full Code Here

    else if (level.intValue() < _finestEffectiveLevel.intValue()) {
      _finestEffectiveLevel = level;
    }
   
    if (loader == _systemClassLoader) {
      _systemEffectiveLevelValue = level.intValue();
    }
    else {
      _hasLocalEffectiveLevel = true;
     
      addLoader(loader);
View Full Code Here

      addLoader(loader);
     
      if (_localEffectiveLevel == null)
        _localEffectiveLevel = new EnvironmentLocal<Integer>();
     
      _localEffectiveLevel.set(level.intValue(), loader);
    }
  }
 
  private Level getOwnEffectiveLevel(ClassLoader loader)
  {
View Full Code Here

    Level localLevel = _localLevel.get(loader);

    if (localLevel != null) {
      if (! _hasLocalEffectiveLevel)
        super.setLevel(localLevel);
      else if (localLevel.intValue() < super.getLevel().intValue())
        super.setLevel(localLevel);

      _hasLocalEffectiveLevel = true;
    }
  }
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.