logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CheapLisa <l...@purpleblade.net>
Subject How is the log4j.xml file located when running a program using Log4J - no workie
Date Mon, 11 Aug 2008 19:55:15 GMT

Maven Layout / Log4J / IntelliJ Question

I have a test case and the default maven layout
	<module>/src/test/java/com/test/JDBCLoggerTest.java
	<module>/src/test/resources/log4j.xml
	
Inside my IDE (IntelliJ) when I compile and run JDBCLoggerTest.java I get:
	Test is running  <= this is inside my JDBCLoggerTest.java
	log4j:WARN No appenders could be found for logger
(com.test.JDBCLoggerTest).
	log4j:WARN Please initialize the log4j system properly.
	
	Why is the app not finding an appender (or rather the log4j.xml file) when
I run the test?
	
	I am not running inside maven (just yet but that is the next step).  Right
now I want to run
	inside my IDE.
	
---	
This is my log4j.xml file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

  <appender name="console" class="org.apache.log4j.ConsoleAppender">
    
    <layout class="org.apache.log4j.PatternLayout">
       
    </layout>
  </appender>

  <root>
    <priority value ="debug" />
    <appender-ref ref="console" />
  </root>

</log4j:configuration>

-- 
View this message in context: http://www.nabble.com/How-is-the-log4j.xml-file-located-when-running-a-program-using-Log4J---no-workie-tp18932490p18932490.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message