logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Hoffman" <jhoff...@irbsearch.com>
Subject Log4j.properties FileNotFound
Date Mon, 28 Aug 2006 11:49:36 GMT
I am new to log4j and trying to use it for a project I am currently
working on.  The problem is I would like to specify the location of the
log4j.properties file:
But if the file is not found, I would like to use the Basic
I figured I could catch the FileNotFoundException and call the basic
} catch (FileNotFoundException e) {
But I discovered that the PropertyConfigurator.configure does not throw
a FileNotFoundException, it handles the exception and throws the error
to the console.  Is there another way to do this?  I have searched the
archive and the internet and could not find an answer, maybe I am not
putting in the proper search terms because it seems like there should be
an easy way to default to a Basic configuration if the properties file
is not present.
Thanks for any help you can provide.
Jon Hoffman

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message