TianzhenOOE
TianzhenOOE

Reputation: 33

Where can I find the log file from GWT's remoteLoggingServlet?

It runs without any log information. I can't find the log file on server anywhere, also didn't find any console info on server(because I don't know which console these log info will be displayed on). Should I do some further config or coding? Thanks.

I have configured GWT-Logging in .gwt.xml as below:

<inherits name="com.google.gwt.logging.Logging"/>
<set-property name="gwt.logging.enabled" value="TRUE"/>
<set-property name="gwt.logging.logLevel" value="FINE"/>
<set-property name="gwt.logging.popupHandler" value="DISABLED" />
<set-property name="gwt.logging.firebugHandler" value="DISABLED" />
<set-property name="gwt.logging.developmentModeHandler" value="DISABLED" />
<set-property name="gwt.logging.consoleHandler" value="DISABLED" />
<set-property name="gwt.logging.systemHandler" value="DISABLED" />
<set-property name="gwt.logging.simpleRemoteHandler" value="ENABLED"/>

remoteLoggingServlet has already been configured in web.xml:

<servlet>
  <servlet-name>remoteLoggingServlet</servlet-name>
  <servlet-class>com.google.gwt.logging.server.RemoteLoggingServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
  <servlet-name>remoteLoggingServlet</servlet-name>
  <url-pattern>/my.app.class.name/remote_logging</url-pattern>
</servlet-mapping>

in GWT Client code:

Logger logger = Logger.getLogger("NameOfYourLogger");
logger.log(Level.SEVERE, "this message should get logged ok!");

web client runs, but where is log file on server? Thanks.

Upvotes: 1

Views: 3101

Answers (2)

TianzhenOOE
TianzhenOOE

Reputation: 33

for log-files: After I put a logging.properties file under war\WEB-INF\classes, it works on tomcat if I deploy the GWT project. The location is tomcat\bin if you doesn't specify any path. It still doesn't work in GWT devMode, maybe the Jetty server in devMode under eclipse works in a different way. But you can enable other handlers to find the log info on eclipse consoles. So far, that's enough for me.

Upvotes: 1

user1258245
user1258245

Reputation: 3639

Don't you need:

/your-gwt-module-name/remote_logging

and not

/my.app.class.name/remote_logging

in

<!-- remote logging -->
<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>/your-gwt-module-name/remote_logging</url-pattern>
</servlet-mapping>

Upvotes: 0

Related Questions