databricks-cli/cmd/root
shreyas-goenka 1fc903943d
Log os.Args, bricks version, and exit status (#324)
## Changes
<!-- Summary of your changes that are easy to understand -->
1. Log os.Args and bricks version before every command execution
2. After a command execution, logs the error and exit code

## Tests
<!-- How is this tested? -->
Manually, 

case 1: Run `bricks version` successfully
```
shreyas.goenka@THW32HFW6T bricks % bricks version --log-level=info --log-file stderr
time=2023-04-12T00:15:04.011+02:00 level=INFO source=root.go:34 msg="process args: [bricks, version, --log-level=info, --log-file, stderr]"
time=2023-04-12T00:15:04.011+02:00 level=INFO source=root.go:35 msg="version: 0.0.0-dev+375eb1c50283"
0.0.0-dev+375eb1c50283
time=2023-04-12T00:15:04.011+02:00 level=INFO source=root.go:68 msg="exit code: 0"
```

case 2: Run `bricks bundle deploy` in a working dir where `bundle.yml`
does not exist
```
shreyas.goenka@THW32HFW6T bricks % bricks bundle deploy --log-level=info --log-file=stderr
time=2023-04-12T00:19:16.783+02:00 level=INFO source=root.go:34 msg="process args: [bricks, bundle, deploy, --log-level=info, --log-file=stderr]"
time=2023-04-12T00:19:16.784+02:00 level=INFO source=root.go:35 msg="version: 0.0.0-dev+375eb1c50283"
Error: unable to locate bundle root: bundle.yml not found
time=2023-04-12T00:19:16.784+02:00 level=ERROR source=root.go:64 msg="unable to locate bundle root: bundle.yml not found"
time=2023-04-12T00:19:16.784+02:00 level=ERROR source=root.go:65 msg="exit code: 1"
```
2023-04-12 22:12:36 +02:00
..
bundle.go Complete argument for the environment flag (#221) 2023-02-20 21:56:31 +01:00
logger.go Add progress logs for job runs (#276) 2023-03-29 14:58:09 +02:00
progress_logger.go Add bundle destroy command (#300) 2023-04-06 12:54:58 +02:00
progress_logger_test.go Add bundle destroy command (#300) 2023-04-06 12:54:58 +02:00
root.go Log os.Args, bricks version, and exit status (#324) 2023-04-12 22:12:36 +02:00
user_agent.go Move code for including command name in user agent (#203) 2023-02-15 10:33:35 +01:00
user_agent_command.go Move code for including command name in user agent (#203) 2023-02-15 10:33:35 +01:00
user_agent_command_test.go Move code for including command name in user agent (#203) 2023-02-15 10:33:35 +01:00
user_agent_upstream.go Let caller set BRICKS_UPSTREAM for user agent (#196) 2023-02-03 17:05:58 +01:00
user_agent_upstream_test.go Let caller set BRICKS_UPSTREAM for user agent (#196) 2023-02-03 17:05:58 +01:00