|
Home > Archive > WebSphere Application Server > August 2005 > JVM Settings Websphere 6
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
JVM Settings Websphere 6
|
|
|
| Hi,
I would like to setting -D option for java.util.logging.config.file in WAS 6. I am using RAD6. In admin console myserver->under Java and process management
->process definition->jvm->custom properties. The funny thing is I could read the property using System.getProperty. But I guess its not considering the logging configuration file that is specified because System.getProperty("java.util.logging.config.file
") returns null. I wonder whether anybody has similar problem.
| |
| Ken Hygh 2005-08-26, 7:56 am |
| shankar.narayana@erieinsurance.com wrote:
>Hi,
>I would like to setting -D option for java.util.logging.config.file in WAS 6. I am using RAD6. In admin console myserver->under Java and process management
>->process definition->jvm->custom properties. The funny thing is I could read the property using System.getProperty. But I guess its not considering the logging configuration file that is specified because System.getProperty("java.util.logging.config.fil
e") returns null. I wonder whether anybody has similar problem.
>
>
Shankar,
Can you be a bit clearer about what you're doing? You say you can read
the property? but it's null?
Ken
| |
|
| Oops I noticed a small mistake in my problem statement. Here it goes, As shown below, in the last statement I am using system.getProperty... to see whether property "java.util.logging.config.file" is properly set or not.And, I am getting the expected valu
e which is the my logging config file path(c:/logging.properties).
Iam also trying to read properties "handler" and "level" from my logging.properties file using methods of LogManager. But results are showing null. I am sure that these keys exist in my logging.properties file.I have also tested this properties file with
a stand-alone application and it just works fine.
So the question is, when the system property is set why I am getting nulls when I try to read properties from logging.properties file. So I got doubt whether the JVM setting (i.e, -Djava.util.confing.file) is properly set or not.
Hope it makes sense.
LogManager manager = LogManager.getLogManager();
String s = manager.getProperty("handlers");
// returns null
s=manager.getProperty("java.util.logging.ConsoleHandler.level");
// returns null
String value = System.getProperty("java.util.logging.config.file");
// returns my config file path as c:/logging.properties
| |
| Ken Hygh 2005-08-27, 7:59 am |
| shankar.narayana@erieinsurance.com wrote:
>Oops I noticed a small mistake in my problem statement. Here it goes, As shown below, in the last statement I am using system.getProperty... to see whether property "java.util.logging.config.file" is properly set or not.And, I am getting the expected val
ue which is the my logging config file path(c:/logging.properties).
>
>Iam also trying to read properties "handler" and "level" from my logging.properties file using methods of LogManager. But results are showing null. I am sure that these keys exist in my logging.properties file.I have also tested this properties file with
a stand-alone application and it just works fine.
>
>So the question is, when the system property is set why I am getting nulls when I try to read properties from logging.properties file. So I got doubt whether the JVM setting (i.e, -Djava.util.confing.file) is properly set or not.
>
>Hope it makes sense.
>
>LogManager manager = LogManager.getLogManager();
>String s = manager.getProperty("handlers");
>// returns null
>
>s=manager.getProperty("java.util.logging.ConsoleHandler.level");
>// returns null
>
>String value = System.getProperty("java.util.logging.config.file");
>// returns my config file path as c:/logging.properties
>
>
Very clear, thanks.
I wonder if you're running into the following from the JavaDoc for
LogManager: "Note that these Handlers may be created lazily, when they
are first used." - it could be that you have to log something before
these properties get created. I haven't used the java.util.logging
framework, so I'm not certain.
Ken
|
|
|
|
|