wazuh-qa
wazuh-qa copied to clipboard
DTT2 - Logging - Improve log file naming and location
Description
DTT1 is storing logs in a hardcoded file located in /tmp/workflow.log
╰─➤ grep -R "workflow\.log"
modules/generic/logger/config.yaml: filename: /tmp/workflow.log
modules/workflow_engine/logger/config.yaml: filename: /tmp/workflow.log
modules/build/lib/workflow_engine/logger/config.yaml: filename: /tmp/workflow.log
modules/testing/tests/helpers/logger/config.yaml: filename: /tmp/workflow.log
Every DTT execution appends the log to this file, we should improve the logging feature with specific log files instead of adding all the logs to a single file
Also, we should modify the log file path as the temporal directory is not the correct path for this type of file.
That is, the log should be stored in a file identified by name-year-month-day-hour-minutes-secons.log
UPDATE
The deployability/modules/generic/logger/config.yaml file defines the log file's "hardcoded" path.
Implementing the proposed default log file name name-year-month-day-hour-minutes-secons.log requires that the main files of the allocation, provision, and testing modules can receive the default log file location as a parameter.