facebook

JUnit tests ignore project specific log4j settings

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #261616 Reply

    jeid
    Member

    My project has a log4j.properties file on the classpath, yet whenever I run a JUnit test, it ignores the settings in the log4j properties file.

    All log4j output goes to STDERR and it is set for INFO and up. I can’t figure out where the log4j appender and other settings are being set. None of the jar files that I have in the project contain a log4j properties file, yet it’s obvious that a custom appender is getting set since the log4j message format is not a typical format.

    How can I set Junit to use the log4j setting of my project?

    #261642 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev

    Check your runtime setup for your JUnit tests, I wonder if different bin directory or something is causing your log4j file not to get picked up. Also did you check the Junit.jar file on your build path for any custom log4j property files?

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: JUnit tests ignore project specific log4j settings

You must be logged in to post in the forum log in