Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

log4j - No appenders could be found for logger

 
Akhilesh Trivedi
Ranch Hand
Posts: 1599
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting below error while trying to write through log4j



Can you please let me know what should be causing this? I have log4j.properties in class-path.
 
Joe Harry
Ranch Hand
Posts: 10122
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try putting that log4j.properties under src/main/resources directory and check if that helped solving the error?
 
Akhilesh Trivedi
Ranch Hand
Posts: 1599
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am on IBM RAD. Tried creating src/main/resources and pasted the properties file there. It doesn't work.
 
Joe Harry
Ranch Hand
Posts: 10122
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Akhilesh Trivedi wrote:I am on IBM RAD. Tried creating src/main/resources and pasted the properties file there. It doesn't work.


Where are you configuring the appender for "logger" I do not see that in your log4j.properties. In your log4j.properties, you have an appender named A1, but where is logger?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic