Package java.util.logging

Examples of java.util.logging.Level$LevelOff


   
  }

  static public void main(String[] args) {
    epmd_port = 4369;
    Level level = Level.WARNING;
    for (int i = 0; i < args.length; i++) {
      if (args[i].startsWith("-p"))
        epmd_port = toInt(args[i].substring(2), epmd_port);
      if (args[i].startsWith("-d"))
        level = toLevel(toInt(args[i].substring(2), 2));
View Full Code Here


        // TODO Logger.global is deprecated, clean up this
        @SuppressWarnings(value = "deprecation")
        public void run(String[] args) throws Exception {

            String loggerName = logger.getName();
            Level level = null;

            switch (args.length) {
                case 0:
                    loggerName = null;
                    level = null;
View Full Code Here

          if ((logger != null) && (logger.getLevel() != null)) {
            logger.setLevel(null);
            log.info("Unset log level on '" + name + "'.");
          }
        } else {
          Level level = Level.parse(value);
          if (logger == null) logger = Logger.getLogger(name);
          if (logger.getLevel() != level) {
            logger.setLevel(level);
            log.info("Set '" + name + "' to " +
                    level + " level.");
View Full Code Here

    return roots;
  }

  private Level getEffectiveLevel(Logger logger) {
    Level level = logger.getLevel();
    if (level != null) {
      return level;
    }
    for (Level l : LEVELS) {
      if (l == null) {
View Full Code Here

                // System.out.println("updateObj.getJobSlotsKeys() " + updatedObj.getJobSlotsKeys());
                assertEquals(retObj.getJobSlots(host), updatedObj.getJobSlots(host));
               
                retObj.removeJobSlots(host);
                Logger logger = Logger.getLogger("com.sun.grid.jgdi");
                Level orgLevel = logger.getLevel();
                logger.setLevel(Level.FINE);
                jgdi.updateClusterQueue(retObj);
               
                updatedObj = jgdi.getClusterQueue(testObj.getName());
                logger.setLevel(orgLevel);
View Full Code Here

            ErlLogger.debug(message);
        }
    }

    public void log(final IStatus status) {
        final Level lvl = getLevelFromSeverity(status.getSeverity());
        logger.log(lvl, status.getMessage());
        final Throwable exception = status.getException();
        if (exception != null) {
            logger.log(lvl, exception);
        }
View Full Code Here

        }
        return dir;
    }

    private static Level getLevelFromSeverity(final int severity) {
        Level lvl;
        switch (severity) {
        case IStatus.ERROR:
            lvl = Level.SEVERE;
            break;
        case IStatus.WARNING:
View Full Code Here

                }

                // OWF issue #129: make sure the logger is not null
                // by using Logger.getLogger(), which will create a logger
                // if necessary
                Level level = Logger.getLogger(loggerName).getLevel();
                if (level == null) {
                    // skip loggers with undefined levels
                    continue;
                }
                origLevels.put(loggerName, level);
View Full Code Here

                logger.log(Level.WARNING, "Error clearing preferences", ex);
            }

            for (int i = 0; i < getRowCount(); i++) {
                String loggerName = (String) getValueAt(i, 0);
                Level level = (Level) getValueAt(i, 1);

                if (loggerName != null && level != null) {
                    Logger.getLogger(loggerName).setLevel(level);
                    prefs.put(loggerName, level.getName());
                    origLevels.remove(loggerName);
                }
            }

            // any values left in origLevels need to be reset to the
View Full Code Here

            Preferences prefs = Preferences.userNodeForPackage(LoggerTableModel.class);
            prefs = prefs.node("loggerTable");

            try {
                for (String loggerName : prefs.keys()) {
                    Level level = Level.parse(prefs.get(loggerName, "WARNING"));
                    Logger createLogger = Logger.getLogger(loggerName);
                    createLogger.setLevel(level);

                    // OWF issue #130: hold a strong reference to the created
                    // logger, to make sure it isn't garbage collected
View Full Code Here

TOP

Related Classes of java.util.logging.Level$LevelOff

Copyright © 2018 www.massapicom. 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.