Hiya,

I'm using GWT 2.,0 (just ported my app from 1.6) on Ubuntu (karmic
amd64), Galileo (Eclipse 3.5) and Spring (2.0.6)
using log4j and a console appender works just fine, and sends the logs
to the Console view in Eclipse (NOTE: NOT the log at the bottom of the
'Development Mode' view).

The log4j.properties is in the classpath (at the root of it) just
double check it gets copied in the war/WEB-INF/classes/ folder (not
sure what config you're using, in my case, I'm using a linked-folder,
so I need to 'include' the file specifically, so that Eclipse copies
it into the output folder).
Do you get any log at all?
because even if you've mangled log4j.properties, you should at the
very least get a "WARN configure log4 properly"-kinda message

(BTW, if you use java.logging instead, then you just get the same
output -- in the same place -- only formatted in the idiotic two-line
format of java logging)

FWIW, this is my log4j.properties:

# This is the default logger, simply logs to console
log4j.logger.com.ibw=DEBUG, A1
log4j.logger.org.apache=DEBUG,A1

log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d{MMM dd, HH:mm:ss} [%C
{2}] %-5p - %m%n

# Logger used by Spring classes
log4j.logger.org.springframework=INFO, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%-5p - %m%n

# If required, logging to file can be enabled by using this one
log4j.logger.com.ibw.filelog=DEBUG, R

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=/var/log/generic.log
log4j.appender.R.MaxFileSize=100KB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=1

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d{MMM dd, HH:mm:ss} [%C{2}]
%-5p - %m%n

and this is how you use it:

package com.ibw.stocks.server;

import org.apache.log4j.Logger;
// bunch of other imports
// ...
public class StocksApplicationContext {
  private static final String BEAN_DEFS_XML = "com/ibw/stocks/
beans.xml";

  private static Logger log = Logger.getLogger
(StocksApplicationContext.class);

  private StocksApplicationContext() {
     log.info("Creating a StocksApplicationContext singleton. Bean
definitions from " + BEAN_DEFS_XML);
     ctx = new ClassPathXmlApplicationContext(BEAN_DEFS_XML);
   }
   // ... other stuff
   public void myMethod() {
      log.debug("A debug log");
      // do something....
    }
}

HTH
Marco
http://codetrips.blogspot.com

On Jan 3, 10:56 am, Paul Grenyer <[email protected]> wrote:
> Hi
>
> Before Christmas I switched from Vista to Ubuntu, so I've been
> wondering if that what's been causing the logs to go missing (unlikely
> i know), but I've just rebooted into Vista and tried it again and it
> still doesn't work.
>
> Surely someone else using Spring is seeing this too?
>
> --
> Thanks
> Paul
>
> Paul Grenyer
> e: [email protected]
> b: paulgrenyer.blogspot.com

--

You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.


Reply via email to