List of usage examples for com.google.gwt.gen2.logging.shared Level INFO
Level INFO
To view the source code for com.google.gwt.gen2.logging.shared Level INFO.
Click Source Link
From source file:com.google.gwt.gen2.demo.logging.client.LoggingDemo.java
License:Apache License
private void addLevelControls(final FlexTable control) { final TextBox box = new TextBox(); box.setText("message 0"); VerticalPanel loggingMessage = new VerticalPanel(); loggingMessage.add(new Label("Message to log")); loggingMessage.add(box);/*from w w w . j a va2 s . c om*/ control.setWidget(0, 1, loggingMessage); Iterator<Level> levels = Log.levelIterator(); final DropDownListBox<Level> levelList = new DropDownListBox<Level>(); while (levels.hasNext()) { final Level level = levels.next(); if (level != Level.ALL || level != Level.OFF) { levelList.addItem(level.getName(), level, "logging level " + level.getName().toLowerCase(), "use <b> " + level.getName().toLowerCase() + "</b> level"); } } control.setWidget(0, 2, levelList); levelList.setValue(Level.INFO); Button log = new Button("Log message", new ClickListener() { public void onClick(Widget sender) { Log.log(box.getText(), levelList.getValue(), "user", null); box.setText("message " + messageNumber++); } }); control.setWidget(0, 3, log); Button error = new Button("Log error", new ClickListener() { public void onClick(Widget sender) { Log.log(box.getText(), levelList.getValue(), "user.error", new NullPointerException()); box.setText("message " + messageNumber++); } }); control.setWidget(0, 4, error); }