Lead your team forward
OCT 24 / 9AM ET Register nowHow 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
.
<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:
-
Launch ONE Desktop.
-
Select Run > Run Configuration.
-
Switch to the Logging tab.
-
Switch to Advanced configuration and find the file you want to use as your logging configuration.
-
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:
<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.sh -runtimeConfig "../server/etc/batch.runtimeConfig" example.plan
Was this page useful?