Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Specifying log file as jvm argument not working

807588Jan 27 2009 — edited Jan 27 2009
I've long used the java.util.logging by having a logging.properties file and specifying the "java.util.logging.FileHandler.pattern" in that file and specifying the location of the logging.properties as a jmv arg (-Djava.util.logging.config.file=logging.properties). No issues with that.

I now, however, want to override the file pattern by using a jvm arg (-Djava.util.logging.FileHandler.pattern=somename.log), but when I do that, I get no file log output. If I leave it specified in the logging.properties it uses the value there and NOT the jvm arg value. If I comment it out of the logging.properties file is uses nothing (no file output).

I see (via Google) others using this parameter, but I am having no luck.

All in latest JDK release (6u11).

Can't find any documentation on doing this on Sun's site (it might be there, but I haven't been able to find it). Don't see posts of others having this problem. I've got the same results on linux and OSX, different releases and all.

Thanks for any insight in advance!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 24 2009
Added on Jan 27 2009
7 comments
1,724 views