gruntwork-io / fetch

Download files, folders, and release assets from a specific git commit, branch, or tag of public and private GitHub repos.
https://www.gruntwork.io/
MIT License
589 stars 90 forks source link

Use better log formatting #30

Closed josh-padnick closed 3 years ago

josh-padnick commented 6 years ago

I was debugging an issue in a call to gruntwork-install, and my underlying issue was actually with the command I passed to fetch. But the logs output by fetch don't make it obvious that it's fetch throwing the error. Here's an example:

    ubuntu-ami: 2017-11-14 20:47:53 [INFO] [gruntwork-install] Success!
    ubuntu-ami: 2017-11-14 20:47:53 [INFO] [gruntwork-install] Installing from install-kafka...
    ubuntu-ami: 2017-11-14 20:47:53 [INFO] [gruntwork-install] Downloading module install-kafka from https://github.com/gruntwork-io/package-kafka
    ubuntu-ami: ERROR: You must specify exactly one of --tag, --commit, or --branch. Run "fetch --help" for full usage info.

The statement Run "fetch --help" for full usage info. is an indicator this is a fetch error, but the log message should be prefixed with the fetch name, as gruntwork-install logs are in the example above.

robmorgan commented 3 years ago

Fixed in https://github.com/gruntwork-io/fetch/releases/tag/v0.4.0