Added a simple logger for tracking execution flow. This is particularly useful for debugging unit tests, since the node-red-test-helper fails to give useful information when it comes figuring out what went wrong and where execution ended.
When running either npm start or npm test, a new log will be created in a logs/ directory. A log file contains information about when nodes were initialised, when a nodes input listener was executed, when a nodes Python script was executed, and when errors occurred. This is open to expansion and can be used to log any event.
The CI pipeline has also been updated so that these log files are stored as artifacts and can be downloaded. This can be useful when trying to debug failed workflows.
Purpose
Added a simple logger for tracking execution flow. This is particularly useful for debugging unit tests, since the
node-red-test-helper
fails to give useful information when it comes figuring out what went wrong and where execution ended.When running either
npm start
ornpm test
, a new log will be created in alogs/
directory. A log file contains information about when nodes were initialised, when a nodes input listener was executed, when a nodes Python script was executed, and when errors occurred. This is open to expansion and can be used to log any event.The CI pipeline has also been updated so that these log files are stored as artifacts and can be downloaded. This can be useful when trying to debug failed workflows.
Changes
logger.js
(ca4f46be228cce31bce6866499d0e515bbb97bba).NODE_ENV
variable onnpm start
script (2e3600bdcc6121791eb9591ce54a84279f338a42).NODE_ENV
variable onnpm test
script (394af5341431ef47805ff5ee22b949453b5b4f49).