gwt-log icon indicating copy to clipboard operation
gwt-log copied to clipboard

log_url is not set for remote logging

Open confile opened this issue 10 years ago • 8 comments

In my web.xml I do:

    <servlet>   
      <servlet-name>gwt-log-remote-logger-servlet</servlet-name>
      <servlet-class>com.allen_sauer.gwt.log.server.RemoteLoggerServlet</servlet-class>
    </servlet>
    <servlet-mapping>
      <servlet-name>gwt-log-remote-logger-servlet</servlet-name>
      <url-pattern>/gwt-logging</url-pattern>
    </servlet-mapping>

On the client side for I do in gwt.xml:

    <set-property name="gwt.logging.logLevel" value="INFO" />
    <set-property name="gwt.logging.enabled" value="TRUE" />
       <set-property name="gwt.logging.simpleRemoteHandler" value="DISABLED" /> 
    <inherits name="com.allen_sauer.gwt.log.gwt-log-ERROR" />
    <extend-property name="log_level" values="DEBUG"/>
    <inherits name="com.allen_sauer.gwt.log.gwt-log-RemoteLogger" />
    <set-property name="log_DivLogger" value="DISABLED" />
    <set-configuration-property name="log_url" value="http://www.example.com/gwt-logging" />

But still it tries to log to: http://www.example.com/gwt-log.

confile avatar Jan 30 '16 20:01 confile

@fredsa Do you have any idea on that issue?

confile avatar Feb 04 '16 13:02 confile

Michael,

Your best bet is to read through https://github.com/fredsa/gwt-log/wiki/GettingStarted#enable-the-remote-logging-option-disabled-by-default

Then, look at the server log to see how the path is being interpreted.

On Thu, Feb 4, 2016 at 5:55 AM, Michael Gorski [email protected] wrote:

@fredsa https://github.com/fredsa Do you have any idea on that issue?

— Reply to this email directly or view it on GitHub https://github.com/fredsa/gwt-log/issues/83#issuecomment-179850045.

Fred Sauer [email protected]

fredsa avatar Feb 04 '16 19:02 fredsa

I read this but still I do not see the error. The client tries to log to: ttp://www.example.com/gwt-log

What did I wrong?

confile avatar Feb 04 '16 20:02 confile

You can also check Chrome Dev Tools and look at the network traffic, to make sure your HTTP request from the client is actually be sent to the server. Of course, the request should appear in the server request logs as well. After that, it's a matter of making sure the request is being routed to the servlet.

On Thu, Feb 4, 2016 at 12:49 PM, Michael Gorski [email protected] wrote:

I read this but still I do not see the error. The client tries to log to: ttp://www.example.com/gwt-log

What did I wrong?

— Reply to this email directly or view it on GitHub https://github.com/fredsa/gwt-log/issues/83#issuecomment-180040990.

Fred Sauer [email protected]

fredsa avatar Feb 04 '16 21:02 fredsa

I checked the Chrome Dev Tools of course. The problem is on the client side it still sends the request to http://www.example.com/gwt-log no matter what URL I put into

    <set-configuration-property name="log_url" value="http://www.example.com/gwt-logging" />

Are you sure that is not a bug?

confile avatar Feb 05 '16 07:02 confile

Always possible of course. Can you just update your web.xml to listed on /gwt-log instead of /gwt-logging to see if things then work?

On Thu, Feb 4, 2016 at 11:42 PM, Michael Gorski [email protected] wrote:

I checked the Chrome Dev Tools of course. The problem is on the client side it still sends the request to http://www.example.com/gwt-log no matter what URL I put into

<set-configuration-property name="log_url" value="http://www.example.com/gwt-logging" />

Are you sure that is not a bug?

— Reply to this email directly or view it on GitHub https://github.com/fredsa/gwt-log/issues/83#issuecomment-180238897.

Fred Sauer [email protected]

fredsa avatar Feb 05 '16 19:02 fredsa

@fredsa Yes it work with /gwt-log the problem still exist that I cannot change the path on the client side.

Do you have any idea or workaround for this? Thanks for help.

confile avatar Feb 06 '16 13:02 confile

There's an example working configuration in the client server demo:

https://github.com/fredsa/gwt-log/blob/master/Log/clientserverdemo/com/allen_sauer/gwt/log/clientserverdemo/LogClientServerDemo.gwt.xml

That's the code for the demo: http://gwt-log.appspot.com/

On Sat, Feb 6, 2016 at 5:32 AM, Michael Gorski [email protected] wrote:

@fredsa https://github.com/fredsa Yes it work with /gwt-logthe problem still exist that I cannot change the path on the client side.

Do you have any idea or workaround for this? Thanks for help.

— Reply to this email directly or view it on GitHub https://github.com/fredsa/gwt-log/issues/83#issuecomment-180765449.

Fred Sauer [email protected]

fredsa avatar Feb 07 '16 01:02 fredsa