Package java.util.logging

Examples of java.util.logging.Level$LevelOff


      String value = (String)attribute.getValue();
      if (log.isLoggable(Level.FINE)) log.fine("Setting log level of name=" + name + " to '" + value + "'");

      try {
         Level level = Level.parse(value);
         this.glob.changeLogLevel(name, level);
      }
      catch (XmlBlasterException e) {
         throw(new AttributeNotFoundException("Cannot set log level attribute '"+ name +"':" + e.getMessage()));
      }
View Full Code Here


    public static void log(String msg) {
        log(Level.INFO, msg);
    }

    public static void log(PrintJobEvent pje) {
        Level lvl;
        String msg = "Print job ";
        switch (pje.getPrintEventType()) {
            case PrintJobEvent.DATA_TRANSFER_COMPLETE:
                lvl = Level.INFO;
                msg += "data transfer complete.";
View Full Code Here

    }

    public static void showMessage(Component c, String title, String msg, Exception e) {
        int msgType = JOptionPane.INFORMATION_MESSAGE;

        Level msgLevel = Level.INFO;
        if (c != null) {
            if (e != null) {
                msg = msg + "\n" + e.getLocalizedMessage();
                msgType = JOptionPane.ERROR_MESSAGE;
                msgLevel = Level.SEVERE;
View Full Code Here

    public static void log(String msg) {
        log(Level.INFO, msg);
    }
   
    public static void log(PrintJobEvent pje) {
        Level lvl;
        String msg = "Print job ";
        switch (pje.getPrintEventType()) {
            case PrintJobEvent.DATA_TRANSFER_COMPLETE:
                lvl = Level.INFO; msg += "data transfer complete."; break;
            case PrintJobEvent.NO_MORE_EVENTS:
View Full Code Here

        final String className = getClass().getName();
       
        final String level = manager.getProperty(className + ".level");
        setLevel((level == null) ? Level.INFO : Level.parse(level));
       
        final Level levelStdOut = parseLevel(manager.getProperty(className + ".levelStdOut"));
        final Level levelSplit = parseLevel(manager.getProperty(className + ".levelSplit"));
        final Level levelStdErr = parseLevel(manager.getProperty(className + ".levelStdErr"));
        setLevels(levelStdOut,levelSplit,levelStdErr);
       
        final String filter = manager.getProperty(className + ".filter");
        setFilter(makeFilter(filter));
       
View Full Code Here

     *          Otherwise, <code>parseStatus</code> is returned.
     */
    protected boolean processParsedOptions(boolean parseOk) {
        if (parseOk) {
            if (logOpt.isSet()) {
                Level level = Level.parse(logOpt.getValue());
                Handler h = new StreamHandler(stream, logFormatter);
                h.setLevel(level);
                Logger rootLogger = Logger.getLogger("");
                rootLogger.addHandler(h);
                rootLogger.setLevel(level);
View Full Code Here

   */
  public static Integer getLevel(final String sComponent){
    if (useJavaLogger){
      final Logger logger = Logger.getLogger(sComponent);
     
      final Level level = logger.getLevel();
     
      final int l = level.intValue();
     
      if (l<=Level.FINEST.intValue())
        return Integer.valueOf(FINEST);
      if (l<=Level.FINER.intValue())
        return Integer.valueOf(FINER);
View Full Code Here

                            : logPattern.matcher(other.trim()));
                    if (logMatcher == null || (!logMatcher.matches()))
                        throw new BadSpecial(
                                SqltoolRB.log_syntax_error.getString());
                    String levelString = logMatcher.group(1);
                    Level level = null;
                    if (levelString.equalsIgnoreCase("FINER"))
                        level = Level.FINER;
                    else if (levelString.equalsIgnoreCase("WARNING"))
                        level = Level.WARNING;
                    else if (levelString.equalsIgnoreCase("SEVERE"))
View Full Code Here

  public static OLogManager instance() {
    return instance;
  }

  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;
      else if (level.equals(Level.INFO)) {
        info = warn = error = true;
        debug = false;
      } else if (level.equals(Level.WARNING)) {
        warn = error = true;
        debug = info = false;
      } else if (level.equals(Level.SEVERE)) {
        error = true;
        debug = info = warn = false;
      }
    }
View Full Code Here

  @Override
  public void doCommand(WatchdogArgs args,
                        WatchdogClient client,
                        ManagerClient managerClient)
  {
    Level logLevel = null;
   
    for(Map.Entry<String, Level> entry : _options.entrySet()) {
      if (args.hasOption(entry.getKey())) {
        logLevel = entry.getValue();
        break;
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.