• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Not able to initialize the log4j.properties

 
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am using a log4j for my standalone Java Project.
I am not able to configure log4j.properties file with configure method of PropertyConfigurator class.
log4j.properties file is present in the one of package in the same project. I am giving Relative path in the configure method as shown below.

PropertyConfigurator.configure("/com/test/dao/logging/log4j.properties");

I am getting below error on console.

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


Above error usually comes when log4j is not in the class path. I tried placing log4j.properties directly under the project folder but getting the same error.
Could anyone please help me what is the wrong.

Thanks in Advance.

 
Don't count your weasels before they've popped. And now for a mulberry bush related tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!