users@glassfish.java.net

Re: Unable to load logging property /Log4J.properties

From: <glassfish_at_javadesktop.org>
Date: Tue, 11 Aug 2009 12:25:46 PDT

I created a method:

---------------------------
static final String LOG_PROPERTIES_FILE = "/Log4J.properties";

private void initializeLogger()
{
  Properties logProperties = new Properties();

  try
  {
    logProperties.load(new FileInputStream(LOG_PROPERTIES_FILE));
    PropertyConfigurator.configure(logProperties);
    logger.info("Logging initialized.");
  }
  catch(IOException e)
  {
    throw new RuntimeException("Unable to load logging property " + LOG_PROPERTIES_FILE);
  }
}

----------------------

However when I called initializeLogger(); I got the exception message:

"Unable to load logging property /Log4J.properties"

Would you please advise me how to fix this?

Thanks a lot.
[Message sent by forum member 'henryliu' (henryliu)]

http://forums.java.net/jive/thread.jspa?messageID=359956