gruntwork-io / gruntwork-io/git-xargs
Ability to Choose Format Used for Logging via CLI Flag
- Dominant language
- Go
- Stars
- 1.1k
- Forks
- 75
- PR merge metrics
- No merged PRs in 30d
Description
**Describe Solution You'd Like**
Ideally you should be able to pass a flag to the `git-xargs` CLI command which indicates what format you'd like to use for the logs that are output by the command execution -- For example:
```bash
# For JSON Logs...
git-xargs --repo gruntwork-io/cloud-nuke \
--repo gruntwork-io/terraform-aws-eks \
--branch-name my-branch \
--log-format=json
/usr/local/bin/my-bash-script.sh
```
Or...
```bash
# For Default/Current Behavior...
git-xargs --repo gruntwork-io/cloud-nuke \
--repo gruntwork-io/terraform-aws-eks \
--branch-name my-branch \
--log-format=text
/usr/local/bin/my-bash-script.sh
```
Would also be really useful if there was a way to specify other logging-related behaviors as well, for things like:
- `--log-file=my-script-results`: Which could take the file system path you wish to output your logs to _AND_ still enable printing stdout/stderr _(so you don't need to pipe things to `tee` to achieve that type of behavior)_
- `--log-file-isolation`: As a boolean flag that, when enabled & a `--log-file` is provided, would output the results of the command's execution in an isolated log file PER repo, something like:
```shell
my-script-results__summary.log # <- the overall execution summary across all repos
my-script-results__repo-a.log # <-- repo-specific logs for execution of targeted script
my-script-results__repo-b.log
my-script-results__repo-c.log
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.