Results 1 to 2 of 2

Thread: spring-ws and log4j

  1. #1
    Join Date
    May 2009
    Posts
    4

    Default spring-ws and log4j

    Hi,

    I am quite new by Spring-WS. I have the problem with logging of SOAP Messages in Tomcat 5.0.28.

    I get no messages in catalina-logs but I already specified the SoapEnvelopeLoggingInterceptor on all my endpoints. I couldn't see my own messages for a long time and I had to write the messages with info log4j method. After that I can see them in tomcat logs.

    Well this is the current version of my log4j file:

    Code:
    log4j.rootCategory=INFO, stdout
    
    log4j.logger.org.springframework.ws=TRACE
    log4j.logger.org.springframework.oxm=TRACE
    log4j.logger.org.springframework.xml=TRACE
    log4j.logger.org.springframework.ws.soap.server.endpoint.interceptor=TRACE
    
    log4j.logger.mypackage.mtom.service=TRACE
    log4j.logger.mypackage.mtom.ws=TRACE
    
    log4j.logger.org.springframework.ws.client.MessageTracing=TRACE
    log4j.logger.org.springframework.ws.server.MessageTracing=TRACE
    
    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
    log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSSS} %p %t %c - %m%n
    I also tried to write in the file in Web App but no file is created. I've placed log4j.properties in src/main/resources. I use Spring-Ws 1.5.6 and other dependencies. For Logging I use org.apache.commons.logging.Log.

    Do I have to bound some Log4J Listener which loads the configuration file or something like that ?

    I've already looked at other Spring-WS examples but there is no special code for Log4J.

    Thx a lot for a hints,

    Music

  2. #2
    Join Date
    May 2009
    Posts
    4

    Default

    Hi,

    I've solved this problem so that I specified the FileDailyAppender as the appender in log4j file. I needed also the log4j dependency in classpath and tomcat.

    Hm, I am not quite sure why the org.apache.commons.Log can not load log4j config file without log4j dependency.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •