aws / copilot-cli

The AWS Copilot CLI is a tool for developers to build, release and operate production ready containerized applications on AWS App Runner or Amazon ECS on AWS Fargate.
https://aws.github.io/copilot-cli/
Apache License 2.0
3.52k stars 414 forks source link

Add verbose or debug flag #61

Open kohidave opened 5 years ago

kohidave commented 5 years ago

If this flag is not provided, we set the logger to be /dev/null or something like that. If the flag is set we print to stdout.

Setting the output of the logger: https://golang.org/src/log/log.go?s=8239:8266#L255

Discard io.Writer: https://golang.org/pkg/io/ioutil/

hencrice commented 5 years ago

In case we want to support logging to a file in the future, here's how we can redirect panic into the log file https://github.com/golang/go/issues/325