5

I am currently using GWT's built in logger, however the way it is attached to the RootPanel is awkward, and it is usually obscured by any panels placed on top. Does anybody know how to move it? I never attached it to the main panel, it seems like it attaches itself. Thanks.

3 Answers 3

10

Are you refering to the popup panel? If you are developing on Firefox or Chrome, try using the firebug/developer console instead. I use the following configuration.

<set-property name='gwt.logging.enabled' value='TRUE'/>           
<set-property name='gwt.logging.consoleHandler' value='ENABLED'/>
<set-property name='gwt.logging.firebugHandler' value='ENABLED'/>  
<set-property name='gwt.logging.popupHandler' value='DISABLED'/> 
3

https://developers.google.com/web-toolkit/doc/latest/DevGuideLogging#Different_Types_of_Handlers

Although the PopupLogHandler is easy to use, it is also a bit invasive. A better solution for most apps is to disable the PopupLogHandler and instead send the log messages to a Panel somewhere in your app.

Just use

logger.addHandler(new HasWidgetsLogHandler(customLogArea));

where customLogArea can be anything that implements HasWidgets (e.g. a FlowPanel, a RootPanel, ...). This allows you to create the log area in your HTML page, in your code or in uiBinder. Also, you can style it any way you like (using CSS or code).

1

I ended up removing the panel by adding the following to the gwt.xml file:

`<set-property name="gwt.logging.consoleHandler" value="DISABLED" />`

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.