cloudformation-cli icon indicating copy to clipboard operation
cloudformation-cli copied to clipboard

Improve logging output

Open ericzbeard opened this issue 3 years ago • 2 comments

Logging needs to be improved in a few ways.

  1. It would be nice if you didn't have to flip back and forth between the direct CLI output and the SAM output in the other terminal when running cfn test.
  2. When running cfn test in CodeBuild, the logs are difficult to read because they are designed for an interactive session. It's very hard to figure out which contract test failed, and why.

ericzbeard avatar Nov 22 '22 16:11 ericzbeard

Also associated https://github.com/aws-cloudformation/cloudformation-cli/issues/948

mmaeng avatar Nov 22 '22 18:11 mmaeng

This command may help to reduce the verbosity to STDOUT

cfn test -- -o log_cli=True -o log_cli_level=WARN -o console_output_style=count

The options after -- are passed along to pytest when it is running the contract tests. The -o are overrides for the pytest options defined in src/rpdk/core/data/pytest-contract.ini

Will work to further clarify logs and output

mmaeng avatar Nov 25 '22 15:11 mmaeng