Package com.google.gwt.libideas.logging.shared

Examples of com.google.gwt.libideas.logging.shared.Level


      }
    }
  }

  public Level parse(String levelName) {
    Level value = null;
    if (levels != null) {
      value = (Level) levels.get(levelName);
    }
    if (value == null) {
      throw new IllegalArgumentException(levelName + " is not a known Level");
View Full Code Here


  protected boolean allows(Level parent, Level child) {
    return parent.intValue() <= child.intValue();
  }

  protected Level getLevelForCategory(String category) {
    Level obj = (Level) categoryLevels.get(category);
    if (obj != null) {
      return obj;
    }
    int index = category.lastIndexOf(".");
    if (index == -1) {
View Full Code Here

    }
    return getLevelForCategory(category.substring(0, index));
  }

  protected void initializeLevels() {
    Level.OFF = new Level("OFF", Integer.MAX_VALUE, true);
    Level.SEVERE = new Level("SEVERE", 1000);
    Level.WARNING = new Level("WARNING", 900);
    Level.INFO = new Level("INFO", 800);
    Level.CONFIG = new Level("CONFIG", 700);
    Level.FINE = new Level("FINE", 500);
    Level.FINER = new Level("FINER", 400);
    Level.FINEST = new Level("FINEST", 300);
    Level.ALL = new Level("ALL", Integer.MIN_VALUE, true);
  }
View Full Code Here

    control.setWidget(0, 1, loggingMessage);
    Iterator levels = Log.levelIterator();
    int pos = 0;

    while (levels.hasNext()) {
      final Level level = (Level) levels.next();
      VerticalPanel p = new VerticalPanel();
      p.add(new Label((level.getName().toLowerCase())));
      control.setWidget(pos, 2, p);
      p.setStyleName("level-control");
      if (!level.isControl()) {
        Button b1 = new Button("log ", new ClickListener() {
          public void onClick(Widget sender) {
            Log.log(box.getText(), level, "user", null);
            box.setText("message " + messageNumber++);
          }
View Full Code Here

      this.setWidget(1, 0, enabled);
      this.setText(2, 0, "Current level");
      final ListBox box = new ListBox();
      Iterator levels = Log.levelIterator();
      while (levels.hasNext()) {
        Level l = (Level) levels.next();
        box.addItem(l.getName());
      }
      box.addChangeListener(new ChangeListener() {
        public void onChange(Widget sender) {
          int index = box.getSelectedIndex();
          String level = box.getItemText(index);
View Full Code Here

TOP

Related Classes of com.google.gwt.libideas.logging.shared.Level

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.