mirror of https://github.com/databricks/cli.git
1fc903943d
## 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" ``` |
||
---|---|---|
.. | ||
bundle.go | ||
logger.go | ||
progress_logger.go | ||
progress_logger_test.go | ||
root.go | ||
user_agent.go | ||
user_agent_command.go | ||
user_agent_command_test.go | ||
user_agent_upstream.go | ||
user_agent_upstream_test.go |