Generating a datahub.log File via the logback.xml File

Instead of checking the console for log files, you can generate a datahub.log file via logback.xml.

The logback.xml file should be under the Data Hub class path in the same folder as the Data Hub local.properties file.

Follow these steps to configure the logback.xml file to generate a datahub.log file:
  1. Edit the logback.xml file to add the following configuration information:

    From the above code sample, the following defines the datahub.log file:

    and this is how file logging is added to the logger:

  2. (Optional) To print the information from your own customized code with a specific log level, you can add your own logger name. For example: <logger name="com.xxx.xxxCustomizedService" level="debug" />.
  3. Restart Data Hub.