aws-otel-test-framework icon indicating copy to clipboard operation
aws-otel-test-framework copied to clipboard

Add log level configuration

Open willarmiros opened this issue 4 years ago • 1 comments

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 avatar Dec 10 '20 16:12 willarmiros

@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

wyTrivail avatar Jan 25 '21 19:01 wyTrivail