User Community Service Desk Downloads
If you can't find the product or version you're looking for, visit support.ataccama.com/downloads

How to Log Batch Jobs to a Rotated File

ONE Runtime Server can log information about the manual execution of ONE plans (via the runcif utility or from ONE Desktop). The following steps provide instructions about how to log plan execution to a rotated file.

Set up logging configuration

Set up your Logging Configuration file or modify the existing <ATACCAMA_HOME>/server/etc/logging.xml.

In this example, we are interested in logging all log records coming from the runtime, so the severity level of our logging rule is set to DEBUG and the logs will be written to dqc[number].log files. Note that we are sending all log records with the severity level INFO and above to the standard output via a different logging rule.

The following is a sample configuration file logging_batch.xml.

logging_batch.xml
<loggingConfig>
    <appenders>
        <iLogAppenderFactory name="rotate" class="com.ataccama.dqc.commons.logging.factories.JDKHandledLogAppenderFactory">
            <handler class="com.ataccama.dqc.commons.logging.handlers.FileHandlerInfo">
                <pattern>dqc%g.log</pattern>
                <limit>1000000</limit>
                <count>4</count>
                <append>true</append>
                <formatter class="com.ataccama.dqc.commons.logging.handlers.SimpleFormatterInfo"/>
            </handler>
        </iLogAppenderFactory>
        <iLogAppenderFactory name="stdout" class="com.ataccama.dqc.commons.logging.factories.StdOutLogAppenderFactory"/>
    </appenders>
    <loggingRules>
        <loggingRule level="DEBUG" appender="rotate">
            <trace/>
        </loggingRule>
        <loggingRule level="INFO" appender="stdout">
            <trace/>
        </loggingRule>
    </loggingRules>
</loggingConfig>

Test logging configuration in ONE Desktop

To test the prepared logging configuration in ONE Desktop:

  1. Launch ONE Desktop.

  2. Select Run > Run Configuration.

    runtime properties run configuration
  3. Switch to the Logging tab.

  4. Switch to Advanced configuration and find the file you want to use as your logging configuration.

  5. Select Run to save changes and run the plan.

Set up runtime configuration

Make sure your runtime configuration file uses the prepared logging configuration file:

batch.runtimeConfig
<runtimeconfig>
    ...
    <loggingConfig>logging_batch.xml</loggingConfig>
    ...
</runtimeconfig>

Run a plan using the prepared runtime configuration

Now run the plan with the prepared runtime configuration:

runcif
runcif.sh -runtimeConfig "../server/etc/batch.runtimeConfig" example.plan

Was this page useful?