cancel
Showing results for 
Search instead for 
Did you mean: 

Log-Configuration with PropertiesConfigurator

Former Member
0 Kudos

Hi all,

I'm trying to configure my logging using class com.sap.tc.logging.PropertiesConfigurator with following code:

File pFile = new File("/tmp/logging.properties");
if (pFile == null || pFile.exists() == false) {
    System.err.println("PROPFILE NOT FOUND");
} else {
    PropertiesConfigurator _propConfig = new PropertiesConfigurator(pFile);
    _propConfig.configure();
    Properties props = _propConfig.getProperties();
    if (props == null) {
        System.err.println("PROPS == NULL");
    } else {
        props.list(System.err);
    }
}

When I run the code I see only the message "PROPS == NULL". Where's my error? I'd expect to see the properties defined in my file!

Thanks for help,

Christoph

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hallo Christoph,

Is your properties file in the format specified by SAP?

You can find the format at this

<a href="http://help.sap.com/javadocs/NW04S/current/en/com/sap/tc/logging/PropertiesConfigurator.html">link.</a>

Bye,

Sameer