This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
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 does not works because it says there is no appender

 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thank you for reading my post.
I have a problem learning log4j , i create a class like :



and a log4j.properties file in the same package that my java class is there.
the properties file is like :


but when i run my application it say :

log4j:WARN No appenders could be found for logger (del_logging.Main).
log4j:WARN Please initialize the log4j system properly.


can some one take a look and help me out ?

Thanks
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That almost always means the properties file isn't in your classpath.
 
Carol Enderlin
drifter
Ranch Hand
Posts: 1364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are running that on the command line add "-Dlog4j.debug" to see some debug on the startup configuration.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic