help with log4j


Web tier: servlets, JSP, Web frameworks: help with log4j

  1. help with log4j (5 messages)

    I wanted to use the log4j with a configuration file so,

    I created an init servlet that configures log4j using "" upon startup.
    I put "" in myapp/WEB-INF/classes and
    log4j.jar in myapp/WEB-INF/lib.
    but I kept getting the message displayed at the bottom of this post. when I ran out of patience, I deleted tomcat directory and installed a new one. Without any applications in webapps i still got the same stupid message. Help
    log4j:WARN No appenders could be found for logger (org.apache.commons.digigester).
    log4j:WARN Please initialize the log4j system properly.
    Starting service Tomcat-Standalone
    Apache Tomcat/4.1.27

    Threaded Messages (5)

  2. help with log4j[ Go to top ]

    The message is coming because your log4j configuration file is referring to an appender which log4j is not able to understand.

    The problem is with the contents of your log4j configuration file. Can you please copy the contents of the configuration file.

    hope this helps
  3. help with log4j[ Go to top ]

    Thanks for the quick reply

    log4j.rootLogger=debug, R
    log4j.appender.R1.layout.ConversionPattern=%p - [%X{RemoteHost}] - %m%n
  4. help with log4j[ Go to top ]

    Is it literally ""? If so, that might be your problem. The default is "". If you use another name, you have to pass it in on the Java command line as "log4j.configuration=<filename>".

  5. help with log4j[ Go to top ]


    Thank you guys, I got it to work. Well, I don't know where I read this but I was told to put log4j.jar in JAVA_HOME\ext\lib. As soon as I took it out of there, Everyting started working. thank you for your help
  6. Hi Ahmed:

    I have one log file for all our modules in a project and is working successfully. We added one application to this project and has to run independently. For this I need to create another logger and created one.
    But the problem is after writing the code, All modules and the new application logging information is going only to one log file depends on the configuration. System is not able to differentiate between the modules and new Application. Can you please suggest in this matter...I can call if you want me to.

    Thank You