Output of Logs for Operator Contents of output of logs for operator

At least the following contents have to be output in the logs for operator so that the operator can respond based on the log.

  • What has occurred?
  • How to respond to it?

If these contents are not output, the operator may not be able to determine how to respond to the event that has occurred. Add the configuration to output the logs for operator to a dedicated log file

Output the logs for operator with the log category name as operator . By using this category name, the log can be output to the logs for operator file.

Shown below is an configuration example of log.properties when the Log Output is used. When using log Adapter , refer to the manual of the log library corresponding to the adapter to perform the configuration.

# operation log file
writer.operationLog.formatter.format=$date$ -$logLevel$- $message$

# logger list

# operation logger setting
loggers.OPERATOR.writerNames=operationLog Log output to the operator

An implementation example for output of the logs for operator is shown below.

  • Output the log using OperationLogger#write.
  • An exception must throw to abnormally end the batch process as well as the log output to the operator.
Implementation examples
public class SampleBatchlet extends AbstractBatchlet {

    public String process() throws Exception {

        try {
            // Omitted
        } catch (FileNotFoundException e) {
            // Notifies the operator that the input file is not found and throws an exception
                    "File does not exist. Check that you have received the correct file." ,
            throw e;

        // Omitted
Output example
ERROR operator file does not exist. Check that you have received the correct file.