Overriding The Default Logging Mode

You can disable the default logging mode and use the log4j mode for logging.

After the default logging mechanism is disabled, the log4j mode for logging is automatically activated, using the default log4j configuration located at BE_HOME\lib\ext\tpcl\apache\log4j.xml. You can also specify your custom log4j file location to be used for logging in the be-engine.tra file.

Procedure

  1. In the Collections tab of the project's CDD, select an existing log configuration under the Log Configurations.
    For details on how to add a log configuration, see Configuring Log Configurations.
    The log configuration properties are displayed.
  2. Clear the Enable check box to disable the default logging mechanism.
    Log Configurations Properties
  3. Save the CDD file.
  4. To use your custom log4j configuration, add the following property in the be-engine.tra file.
    java.property.log4j.configuration=[custom_log4j_path]
    Note: If the file is not in the classpath but located elsewhere on your device, use the following path:
    java.property.log4j.configuration=file:[custom_log4j_file_path]