Logging

Welcome to the Logging section, where we dive deep into the essential art of log management within the Aiviro framework. In this guide, we’ll explore how to configure and utilize logs effectively, providing invaluable insights into the runtime behavior of your automation scripts.

Type of logs

Aiviro generates two types of logs, each serving a specific purpose in enhancing script analysis and troubleshooting:

  • Text Logs - Contain textual information, such as details of compared texts during element searches or executed commands.

  • Image Logs - Include screenshots captured by Aiviro, accompanied by corresponding elements’ bound-boxes. These logs offer visual insights into script execution, enabling developers to visually inspect the state of the application at different stages of script execution. Image logs are particularly useful for identifying visual anomalies, verifying element recognition, and debugging issues related to UI interactions.

To configure logging in Aiviro, check out the Logging section.

In case you wish to log additional information during script execution, you can simply use Aiviro logger, check the Logging section for all available methods.

Log Structure

The logs/ directory contains all the logging-related artifacts generated during script execution.

For easy log management, you can use the Explorer tool to view, download, and analyze logs.

📁 logs/
├── 📁 runs/
│   └── 📁 run--2024_04_10-09_20_52--demo_4--12cc206ea0404d8e89d09791a7f5ac5f/
|       ├── 📁 images_metadata/
|       |   ├── 📄 2024-04-05_12-08-34-172_daaca713cf0611f3e0a56dfa85c7a8653d9b7e00.json
|       |   └── 📄 2024-04-05_12-08-34-172_daaca713cf0611f3e0a56dfa85c7a8653d9b7e00.png
|       ├── 📁 images/
|       |   └── 📄 2024-04-05_12-08-51-380_aiviro.core.find.SetImage_INFO.png
|       ├── 📁 video/
|       |   ├── 📄 video_0.mp4
|       |   └── 📄 video_1.mp4
|       ├── 📁 error_analysis/
|       |   └── 📄 error_2024-04-15_17-39-58_0.zip
│       ├── 📄 log_MainProcess_debug.txt
│       └── 📄 log_MainProcess_info.txt
└── 📁 stats/
    └── 📁 run--2024_04_10-09_20_52--demo_4--12cc206ea0404d8e89d09791a7f5ac5f/
        ├── 📄 steps.json
        └── 📄 metrics.json

Runs

This folder stores logs and associated text & image data for each individual script run.

  • run--2024_04_10-09_20_52--demo_4--12cc206ea0404d8e89d09791a7f5ac5f - Each subfolder corresponds to a specific script run, uniquely identified by its timestamp, name and script ID.

  • images_metadata/ - This subfolder contains metadata files and corresponding images captured during script execution. You can generate visual representations of the captured images from the metadata files. See the Process Metadata Logs section for more details.

    • 2024-04-05_12-08-34-172_daaca713cf0611f3e0a56dfa85c7a8653d9b7e00.json - metadata file associated with the captured image, containing details such as recognized elements and their bounding boxes.

    • 2024-04-05_12-08-34-172_daaca713cf0611f3e0a56dfa85c7a8653d9b7e00.png - captured image file.

  • images - This subfolder stores images generated from the metadata files.

    • 2024-04-05_12-08-51-380_aiviro.core.find.SetImage_INFO.png - Captured image file with associated timestamp, logger name, and log level.

  • videos - This subfolder contains videos generated from metadata files. See Generating Video for more details.

  • error_analysis - This subfolder contains error analysis artifacts. See Analyze Errors for more details.

  • log_MainProcess_debug.txt - DEBUG level log file for the main process.

  • log_MainProcess_info.txt - INFO level log file for the main process.

Stats

This folder stores information related to script execution, such as steps data and metrics. Each subfolder corresponds to a specific script run, uniquely identified by its timestamp and script ID.

  • steps.json - JSON file containing step data.

  • metrics.json - JSON file containing metrics data.