Athento allows you to consult the logs generated after the last execution of an operation.
To do this, we can go to the Automation tab within a Space, and click on the icon added to each of the installed operations:
When you click on this icon and, if the operation has been executed and is properly configured to show the logs, they will be displayed:
Configure an operation to record its logs
For the logs to be displayed in the above screen, they must be properly configured in the operation code. To do this, the OperationCustomLogger class must be used, as shown in this example.
Note that the code shown here generates the logs seen in the previous example.
The steps are:
- Initialize the logger in the operation file using the class provided.
- Initialize the logger at the beginning of the "run" method. This allows the logger to know the UUID of the operation and thus be able to differentiate from which space it was launched.
- Use the logger in the same way as any other logger.