private void setDefaultHandlers(Logger l) {
// Add the default handlers. If users want some of these disabled, they
// will specify that in the gwt.xml file, which will replace the handler
// with an instance of NullLogHandler, effectively disabling it.
Handler console = GWT.create(ConsoleLogHandler.class);
addHandlerIfNotNull(l, console);
Handler dev = GWT.create(DevelopmentModeLogHandler.class);
addHandlerIfNotNull(l, dev);
Handler firebug = GWT.create(FirebugLogHandler.class);
addHandlerIfNotNull(l, firebug);
Handler system = GWT.create(SystemLogHandler.class);
addHandlerIfNotNull(l, system);
HasWidgets loggingWidget = GWT.create(LoggingPopup.class);
if (!(loggingWidget instanceof NullLoggingPopup)) {
addHandlerIfNotNull(l, new HasWidgetsLogHandler(loggingWidget));
}