Package java.util.logging

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


      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

    public abstract Level getLevel();

    public boolean isLoggable(Level level) {
        Level l = getLevel();
        return level.intValue() >= l.intValue() && l != Level.OFF;
    }

    protected boolean supportsHandlers() {
        return false;
    }
View Full Code Here

    @Override
    protected void logInternal(LogRecord logRecord) {
        final Level level = logRecord.getLevel();
        if (isLoggable(level)) {
            if (level.intValue() >= Level.SEVERE.intValue()) {
                logger.error(logRecord.getMessage(), logRecord.getThrown());
            } else if (level.intValue() >= Level.WARNING.intValue()) {
                logger.warn(logRecord.getMessage(), logRecord.getThrown());
            } else if (level.intValue() >= Level.INFO.intValue()) {
                logger.info(logRecord.getMessage(), logRecord.getThrown());
View Full Code Here

    protected void logInternal(LogRecord logRecord) {
        final Level level = logRecord.getLevel();
        if (isLoggable(level)) {
            if (level.intValue() >= Level.SEVERE.intValue()) {
                logger.error(logRecord.getMessage(), logRecord.getThrown());
            } else if (level.intValue() >= Level.WARNING.intValue()) {
                logger.warn(logRecord.getMessage(), logRecord.getThrown());
            } else if (level.intValue() >= Level.INFO.intValue()) {
                logger.info(logRecord.getMessage(), logRecord.getThrown());
            } else if (level.intValue() >= Level.FINER.intValue()) {
                //Please note that FINE(500) is also caught by FINER(400)
View Full Code Here

        if (isLoggable(level)) {
            if (level.intValue() >= Level.SEVERE.intValue()) {
                logger.error(logRecord.getMessage(), logRecord.getThrown());
            } else if (level.intValue() >= Level.WARNING.intValue()) {
                logger.warn(logRecord.getMessage(), logRecord.getThrown());
            } else if (level.intValue() >= Level.INFO.intValue()) {
                logger.info(logRecord.getMessage(), logRecord.getThrown());
            } else if (level.intValue() >= Level.FINER.intValue()) {
                //Please note that FINE(500) is also caught by FINER(400)
                logger.debug(logRecord.getMessage(), logRecord.getThrown());
            } else if (logger.isTraceEnabled()) {
View Full Code Here

                logger.error(logRecord.getMessage(), logRecord.getThrown());
            } else if (level.intValue() >= Level.WARNING.intValue()) {
                logger.warn(logRecord.getMessage(), logRecord.getThrown());
            } else if (level.intValue() >= Level.INFO.intValue()) {
                logger.info(logRecord.getMessage(), logRecord.getThrown());
            } else if (level.intValue() >= Level.FINER.intValue()) {
                //Please note that FINE(500) is also caught by FINER(400)
                logger.debug(logRecord.getMessage(), logRecord.getThrown());
            } else if (logger.isTraceEnabled()) {
                logger.trace(logRecord.getMessage(), logRecord.getThrown());
            }
View Full Code Here

            writer.println("<hr>");
            writer.println("<b>Liquibase started at " + DateFormat.getDateTimeInstance().format(new Date(liquibaseRunLog.get(0).getMillis())));
            writer.println("<hr>");
            writer.println("<pre>");
            for (LogRecord record : liquibaseRunLog) {
                if (record.getLevel().intValue() >= currentLevel.intValue()) {
                    writer.println(record.getLevel() + ": " + record.getMessage());
                    if (record.getThrown() != null) {
                        record.getThrown().printStackTrace(writer);
                    }
                }
View Full Code Here

   * @param error
   */
  public static void report(String tag, Object msg, Level error) {
    // Ignore?
    Level minLevel = Environment.get().get(MIN_LEVEL);
    if (minLevel != null && minLevel.intValue() > error.intValue())
      return;
    if (ignoredTags.contains(tag))
      return;

    String msgText = Printer.toString(msg);
View Full Code Here

        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

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.