Hi Sharad,
well, currently the frontend logs only to the GWT Development Console. So, if you want to
see the logs,
you should run the frontend in development mode and see the logs in the console.
If you really want to send the logs to the backend, you can do it like this (this example
will be for user portal, you can do it equivalently for web admin) :
1: enable the remote handler in the gwt.xml file for the User Portal like this:
open the UserPortal.gwt.xml and and add this line to the gwt logging configuration:
<set-property name="gwt.logging.simpleRemoteHandler"
value="ENABLED" />
2: this is only to enable the handler on the frontend, this handler needs some servlet to
send the logs to, which will do the backend part. You can do it
by editing the web.xml of the User Portal
(./frontend/webadmin/modules/userportal-gwtp/src/main/webapp/WEB-INF/web.xml) and add the
following definition to it:
<servlet>
<servlet-name>remoteLogging</servlet-name>
<servlet-class>com.google.gwt.logging.server.RemoteLoggingServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>remoteLogging</servlet-name>
<url-pattern>/org.ovirt.engine.ui.userportal.UserPortal/remote_logging</url-pattern>
</servlet-mapping>
3: recompile and redeploy the application and it should work
For more details about the GWT logging please consult
https://developers.google.com/web-toolkit/doc/latest/DevGuideLogging
But be careful, it is rarely a good idea to send frontend logs to the backend. Even during
development you should use the GWT Development Console.
Have a nice day,
Tomas
----- Original Message -----
From: snmishra(a)linux.vnet.ibm.com
To: users(a)ovirt.org
Sent: Thursday, August 30, 2012 6:33:32 AM
Subject: [Users] gwt logging.
Hi,
I am new to gwt and trying to understand how logging is done. I am
looking at
./frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VncConsoleModel
class. I see this class does log its messages but I am unable to find them in engine.log
or engine-ui.log. I tried to enable logging by modifying the
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/UICommonWeb.gwt.xml
to
include
<!-- Inherit GWT logging module and configure it -->
<inherits name="com.google.gwt.logging.Logging" />
<set-property name="gwt.logging.enabled" value="TRUE"
/>
<set-property name="gwt.logging.logLevel" value="INFO"
/>
<set-property name="gwt.logging.popupHandler"
value="DISABLED" />
But that did not help.
Thanks
Sharad Mishra
_______________________________________________
Users mailing list
Users(a)ovirt.org
http://lists.ovirt.org/mailman/listinfo/users