GeeCON Prague 2014*
The moose likes Java in General and the fly likes Specify custom logging.properties file in the a Java program. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "Specify custom logging.properties file in the a Java program." Watch "Specify custom logging.properties file in the a Java program." New topic
Author

Specify custom logging.properties file in the a Java program.

Bruce Jin
Ranch Hand

Joined: Sep 20, 2001
Posts: 666
I know I can use command line
> java -Djava.util.logging.config.file=myfile
to specify a custom property file.
How to do this in the java code?
I tried
System.setProperty("java.util.logging.config.file", "mylog.properties");
it does not work.
Thanks.


BJ - SCJP and SCWCD
We love Java programming. It is contagious, very cool, and lot of fun. - Peter Coad, Java Design

Crazy Bikes created by m-Power
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Specify custom logging.properties file in the a Java program.