Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move GWT Logging window

Tags:

java

logging

gwt

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.

like image 924
Steven Morad Avatar asked Jul 31 '12 17:07

Steven Morad


2 Answers

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'/> 
like image 126
Zzzzz Avatar answered Oct 11 '22 18:10

Zzzzz


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).

like image 41
Chris Lercher Avatar answered Oct 11 '22 18:10

Chris Lercher