• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Can't read property file in log4j

 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,
I'm still a beginner using Log4J, I'm trying using property file for setting the confirguration for log4j in a test java file with main method, I set the classpath for a location that reside with xx_log4j.properties
But the file was never read, except I write the full path of it, I opened the source of the PropertyConfigurator & I found that it reads the file using class, which I think does not search the classpath for file.
so any suggestion ?!?!?!?!?!
I thought for an idea to use something to search the classpath for the file, then get the absolute path and pass it in the PropertyConfigurator, I tried to use but there is no method to return the absolute path.
so any suggestion to determine a file in the classpath
 
reply
    Bookmark Topic Watch Topic
  • New Topic