Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Logging in SmartGWT Mobile

    I am finding it hard to enable logging using gwt-log.
    In the SmartGWT Mobile documentation you have asked to include both smart-mobile.jar as well as gwt-log-3.0.2.jar.
    But the classes in gwt-log-3.0.2 jar are present in smart-mobile.jar.
    Is there am example of logging in SmartGWT Mobile.
    If yes it would be great.

    This is what i have done:
    Added these 2 lines in *.gwt.xml
    Code:
      <inherits name="com.allen_sauer.gwt.log.gwt-log-DEBUG" />
      <set-configuration-property name="log_pattern" value="(%F:%L) %d [%-5p] %m%n" />
    And this in the class that implements EntryPoint:

    Code:
        @Override
        public void onModuleLoad() {
          Log.setUncaughtExceptionHandler();
    
          Scheduler.get().scheduleDeferred(new ScheduledCommand() {
            @Override
            public void execute() {
              onModuleLoad2();
            }
          });
        }
        
        private void onModuleLoad2() {
        	Log.debug("Print 'DEBUG' message");
    //     Program Code     
        }
    The errors that I get when trying to do a GWT compile are:
    Without the gwt-log-3.0.2.jar=>
    Code:
    gwtc:
         [java] Compiling module com.*
         [java]    Validating newly compiled units
         [java]       Ignored 1 unit with compilation errors in first pass.
         [java] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
         [java]    [ERROR] Errors in 'jar:file:/*/war/WEB-INF/lib/smartgwt-mobile.jar!/com/allen_sauer/gwt/log/client/Log.java'
         [java]       [ERROR] Line 38:  The method getProperty(String) is undefined for the type System
         [java]    [ERROR] Cannot proceed due to previous errors
    With the gwt-log-3.0.2.jar=>
    Code:
    Compiling module com.cgone.mond03.mobile.Mond03Mobile
       [ERROR] Errors in 'jar:file:/C:/Users/Vivek/workspace/Mond03Mobile/war/WEB-INF/lib/smartgwt-mobile.jar!/com/allen_sauer/gwt/log/client/util/DOMUtil.java'
          [ERROR] Line 29:  Rebind result 'com.allen_sauer.gwt.log.client.util.impl.DOMUtilImpl' cannot be abstract
       [ERROR] Cannot proceed due to previous errors
    Any help will be appreciated.
    Last edited by vivek.nandavanam; 19 Jun 2012, 20:36. Reason: Added [CODE] blocks for better viewing

    #2
    Hello,

    With regards to your error on building without logging, I also had a similar error which was solved by moving to GWT2.4.0 from GWT2.3.0.

    Hope this helps.

    Comment

    Working...
    X