aws-otel-test-framework
aws-otel-test-framework copied to clipboard
Add log level configuration
It'd be nice to configure the log level output to not include some of the more verbose more verbose messages (like logging an entire trace on every retry) when running the framework locally. This log level could be configured with command line arg --log-level
accepted by App.java
. We can configure Log4J to use it with one of these workarounds: https://stackoverflow.com/questions/7126709/how-do-i-set-log4j-level-on-the-command-line
@willarmiros thank you for this suggestion!
There're two parts of the logs we need to take care,
-
the log in terraform, which is not managed by log4j, https://www.terraform.io/docs/internals/debugging.html. we can document that customer/contributors could use
TF_LOG
as an environment variable to change the log level. Currently, the default level is TRACE. -
the validator written in java, which is managed by log4j, and yes we can have that arg when we launch it: https://github.com/aws-observability/aws-otel-test-framework/blob/terraform/terraform/validation/main.tf#L54