gwt-log with log4j2 in remoteServer mode

353 views
Skip to first unread message

Cédric JOUBERT

unread,
Mar 13, 2014, 6:42:01 AM3/13/14
to gwt...@googlegroups.com
Hi,

- I'm using gwt-log and all works fine... except when I call Log.info("test") from the client... I do not see the log in server side (looking in the file created by log4j2 in the server side).
Can you confirm the client log must not be manually transmitted with a call RPC (with another standard interface and Async) because gwt-log does automatically ?

On the server side my Log4j2 logs works well, but I do not see any trace from those of client.


- In the Log class I see this code but from my appli, i'm not sure the tryLog4J() is called...
how is it done please ?


because in tomcat-stderr logs, in can see : mars 13, 2014 11:24:36 AM com.allen_sauer.gwt.log.server.ServerLogImplJDK14 log
so it appears that gwt-log is using JDK14 in place of log4j.... maybe gwt-log only compatible with the version no1 of log4j ?


  static {
    String remoteLoggerPreference = System.getProperty(GWT_LOG_
REMOTE_LOGGER_PREFERENCE);
    if (remoteLoggerPreference != null) {
      if (remoteLoggerPreference.equals("LOG4J")) {
        impl = tryLog4J();
      } else if (remoteLoggerPreference.equals("JDK14")) {
        impl = tryJDK14();
      } else {
        if (!remoteLoggerPreference.equals("STDIO")) {
          throw new UnsupportedOperationException("System property "
              + GWT_LOG_REMOTE_LOGGER_PREFERENCE + " set to unrecognized value '"
              + remoteLoggerPreference + "'");
        } else {
          impl = tryStdio();
        }
      }
    }


Regards
C Joubert

Fred Sauer

unread,
Mar 14, 2014, 8:05:01 PM3/14/14
to gwt...@googlegroups.com


--
You received this message because you are subscribed to the Google Groups "gwt-log" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gwt-log+u...@googlegroups.com.
To post to this group, send email to gwt...@googlegroups.com.
Visit this group at http://groups.google.com/group/gwt-log.
For more options, visit https://groups.google.com/d/optout.



--
Fred Sauer
fre...@gmail.com

Cédric JOUBERT

unread,
Mar 18, 2014, 10:15:30 AM3/18/14
to gwt...@googlegroups.com
where please... which param ?
I've all readed... tried a lot of things without success...

Larisa Fay

unread,
Apr 23, 2014, 9:24:03 AM4/23/14
to gwt...@googlegroups.com
Hi,

I have the same question.
Did you find the answer?

Please share.

Thank you,
Larisa

Fred Sauer

unread,
Apr 23, 2014, 4:21:56 PM4/23/14
to gwt...@googlegroups.com
On the server you should try

   Log.error("error test");
   Log.warn("warn test");
   Log.debug("debug test");
   ...

Make sure those are being logged as expected, then setup the remote logging servlet as well as enabling the RemoteLogger as documented in the Getting Started instructions. Use the browsers network inspector to confirm that XHRs are being sent from client to server as messages are logged on the client.

Larisa Fay

unread,
Apr 24, 2014, 2:40:32 PM4/24/14
to gwt...@googlegroups.com

Thank you. That was very helpful.

Larisa

--
You received this message because you are subscribed to a topic in the Google Groups "gwt-log" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gwt-log/zIqIrbBtN44/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gwt-log+u...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages