List of usage examples for com.google.gwt.gen2.logging.shared Log severe
public static void severe(String message)
From source file:com.google.gwt.gen2.demo.collapsiblepanel.client.CollapsiblePanelDemo.java
License:Apache License
/** * This is the entry point method.//from w ww . j a v a 2 s.co m */ public void onModuleLoad() { try { // Some random contents to make the tree interesting. Panel contents = createSchoolNavBar(); FastTree.injectDefaultCss(); CollapsiblePanel.injectDefaultCss(); // The panel. final CollapsiblePanel panel = new CollapsiblePanel(); panel.addCollapsedStateHandler(new CollapsedStateHandler() { public void onCollapsedState(CollapsedStateEvent e) { Window.alert("panel collapsed"); } }); panel.addExpandedStateHandler(new ExpandedStateHandler() { public void onExpandedState(ExpandedStateEvent e) { Window.alert("panel expanded"); } }); String value = Location.getParameter("collapsed"); if (value != null) { value = value.trim(); if (value.equals("true")) { panel.setCollapsedState(true); } else if (value.equals("false")) { // do nothing, default. } else { Window.alert("collapsed should not be given " + value + " use true or false instead"); } } RootPanel.get("collapsible-panel").add(panel); panel.add(contents); panel.setHeight(Window.getClientHeight() - 1 + "px"); panel.hookupControlToggle(controlButton); } catch (RuntimeException e) { if (GWT.isScript()) { Log.severe(e.getMessage()); } throw e; } }
From source file:com.google.gwt.gen2.demo.logging.client.LoggingDemo.java
License:Apache License
/** * This is the entry point method.//from w ww.ja v a 2s .c o m */ public void onModuleLoad() { if (Log.isLoggingSupported() && !Log.isLoggingMinimal()) { Gen2CssInjector.addLogHandlerDefault(); Log.setDefaultLevel(Level.ALL); final FlexTable control = new FlexTable(); RootPanel.get().add(control); addLevelControls(control); addHandlers(control); } else { Window.alert("Now that you have logging turned off or to minimal, now check your compiled output."); Log.warning("Should be compiled out when logging is turned off or in minimal mode"); Log.severe("Should be compiled out when logging is turned off, but present in minimal mode"); } }