Example usage for com.google.gwt.logging.client HasWidgetsLogHandler publish

List of usage examples for com.google.gwt.logging.client HasWidgetsLogHandler publish

Introduction

In this page you can find the example usage for com.google.gwt.logging.client HasWidgetsLogHandler publish.

Prototype

@Override
    public void publish(LogRecord record) 

Source Link

Usage

From source file:client.net.sf.saxon.ce.LogController.java

License:Mozilla Public License

public static void addRequiredLogHanders(LogRecord record) {
    jsLogHandler = new JsLogHandler();
    mainLogger.addHandler(jsLogHandler);
    jsLogHandler.publish(record);//from  ww w  .j  a  v  a2  s. c om

    GenericLogHandler gHandler = new GenericLogHandler();

    // popup & firebug must be disabled using Saxonce.gwt.xml and enabled
    // below - if required
    if (gHandler.isSupported()) {
        mainLogger.addHandler(gHandler);
        gHandler.publish(record);
    } else if (!SaxonceApi.isLogHandlerExternal()) {
        HasWidgets loggingWidget = new LoggingPopup();
        HasWidgetsLogHandler hw = new HasWidgetsLogHandler(loggingWidget);
        mainLogger.addHandler(hw);
        hw.publish(record);
    }
}