Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Log-Configuration with PropertiesConfigurator

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

Former Member
Not what you were looking for? View more on this topic or Ask a question