Announcement Announcement Module
Collapse
No announcement yet.
Logging problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • SpringDeveloper
    started a topic Logging problem

    Logging problem

    Hi all,

    Am new to Spring. I downloaded spring recently and tried to develop a web application using webapp-minimal package. Everything was fine except loggng. Am unable to enable logging into my web application. I tried deploying web application into Weblogic. But my appserver is not trying to initialize my logging i.e. not trying to write to my log file.

    Can some highlight me the problem. Thanx in advance for any help.

  • Paul Newport
    replied
    Originally posted by Costin Leau
    there have been some discussions about this in the past at least regarding WebSphere - not sure if you already done this but please do a search on the forum.
    Spring uses commons-logging so I guess the problem is getting Weblogic to initialize commons-logging (and the underlying logging system - usually log4j).
    A quick Websphere recap - IBM use a jar called ws-commons.jar that redirects all commons logging to websphere logs. Just bin this jar file and if you are using log4j just make sure log4j.properties in the app servers classpath. Of course I wouldn't recommend this in a production environment !

    Leave a comment:


  • mzeibig
    replied
    Try to start your server with:
    Code:
    -Dlog4j.debug
    MfG Mirko

    Leave a comment:


  • SpringDeveloper
    replied
    I put both my commons-logging and log4j in the /WEB-INF/lib folder.

    Leave a comment:


  • dejanp
    replied
    Originally posted by SpringDeveloper
    Weblogic has its own logging mechanism. I have done the steps exactly as mentioned in Spring MVC Step by Step document.

    1. Created a log4j.properties and put it in /WEB-INF/classes folder. Used File appender.
    2. Put the commons-logging.jar in the /WEB-INF/lib folder.
    3. Then used the log factory class to initialize in my program.
    4. Deployed to Weblogic. But didnt see the initialization of log4j in Weblogic Startup.

    The problem is didnt create any log file in the directory i specified. Can someone help?
    Where did you put log4j.jar?

    Leave a comment:


  • SpringDeveloper
    replied
    Weblogic has its own logging mechanism. I have done the steps exactly as mentioned in Spring MVC Step by Step document.

    1. Created a log4j.properties and put it in /WEB-INF/classes folder. Used File appender.
    2. Put the commons-logging.jar in the /WEB-INF/lib folder.
    3. Then used the log factory class to initialize in my program.
    4. Deployed to Weblogic. But didnt see the initialization of log4j in Weblogic Startup.

    The problem is didnt create any log file in the directory i specified. Can someone help?

    Leave a comment:


  • Costin Leau
    replied
    there have been some discussions about this in the past at least regarding WebSphere - not sure if you already done this but please do a search on the forum.
    Spring uses commons-logging so I guess the problem is getting Weblogic to initialize commons-logging (and the underlying logging system - usually log4j).

    Leave a comment:

Working...
X