2

I am getting "Logger Not Found" error when I import org.apache.log4j.Logger. I am using JDeveloper 10.1. Do I need to configure Log4j and if so please tell me how to do that. Thanks.

Biswajit das
  • 99
  • 1
  • 11

2 Answers2

0

You need to add the log4j jar to the classpath.

http://www.oracledistilled.com/java/adding-java-libraries-to-oracle-jdeveloper-11g-r1/

rich
  • 18,987
  • 11
  • 75
  • 101
0

Your error sounds like you already have Log4J setup so yes, you need to configure Log4J.

Add a log4j.properties file to your classpath using the sample config below:

# Set root logger level to INFO and its only appender to ConsoleOut.
log4j.rootLogger=INFO, ConsoleOut

# ConsoleOut is set to be a ConsoleAppender.
log4j.appender.ConsoleOut=org.apache.log4j.ConsoleAppender

# ConsoleOut uses PatternLayout.
log4j.appender.ConsoleOut.layout=org.apache.log4j.PatternLayout
log4j.appender.ConsoleOut.layout.ConversionPattern=%-5p: [%d] %c{1} - %m%n
Saïd
  • 8,780
  • 1
  • 28
  • 28