Fantom-foundation / Norma

Integration project of Carmen and Tosca
GNU Lesser General Public License v3.0
2 stars 9 forks source link

[Test QoL] Suppress Verbose Log #237

Closed rpl-ffl closed 4 days ago

rpl-ffl commented 3 months ago

Current the following test TestLogsIntegrationGetRealMetric, TestCanCollectCpuProfileDateFromOperaNode are expected to print the following lines:

2024/08/12 16:11:04 monitoring: failed to parse log: Get "node1/debug/metrics/prometheus": unsupported protocol scheme ""
2024/08/12 16:11:04 monitoring: failed to parse log: Get "http://localhost:33541/debug/metrics/prometheus": dial tcp 127.0.0.1:33541: connect: connection refused
2024/08/12 16:11:21 closing prometheus log parser
2024/08/12 16:11:21 prometheus log parser closed

While expected, these lines can clutter up the log during CI/CD at best and cause confusion at worst. In response, an optional SuppressVerboseLog function is added to suppress the logs.

As agreed, print a warning instead of suppress the log.

rpl-ffl commented 3 months ago

https://github.com/Fantom-foundation/Norma/issues/207