databricks-cli/cmd/root
Miles Yucht 8a1be76910
Always log with text format by default (#1096)
## Changes
The JSON logger is excellent as a machine-readable logger with lots of
metadata, but the resulting logs are difficult to read:

<img width="1601" alt="Image_from_Databricks"
src="https://github.com/databricks/cli/assets/1850319/76aa852f-756f-4e0a-bc00-3a6e3224296a">

Currently, we only use the friendly log printer when run from a TTY.
This PR removes that restriction, so logs will be pretty-printed by
default, regardless of TTY or not. If a user needs machine-readable
logs, they can still use `--log-format JSON`.

## Tests
Manual test: `databricks current-user me --debug | cat` uses the
pretty-printing logger.


![Screenshot_02_01_2024__13_12](https://github.com/databricks/cli/assets/1850319/45fd5587-52f6-4864-b7d2-3708ed2ff87f)
2024-01-03 09:39:33 +00:00
..
auth.go Allow account client auth with environment variables when no .databrickscfg file present (#1097) 2024-01-02 15:34:43 +00:00
auth_options.go Never load authentication configuration from bundle for sync command (#889) 2023-10-19 12:50:46 +00:00
auth_options_test.go Never load authentication configuration from bundle for sync command (#889) 2023-10-19 12:50:46 +00:00
auth_test.go Allow account client auth with environment variables when no .databrickscfg file present (#1097) 2024-01-02 15:34:43 +00:00
bundle.go Consolidate environment variable interaction (#747) 2023-09-11 08:18:43 +00:00
bundle_test.go Fix panic when bundle auth resolution fails (#1002) 2023-11-30 14:28:01 +00:00
io.go Consolidate environment variable interaction (#747) 2023-09-11 08:18:43 +00:00
logger.go Always log with text format by default (#1096) 2024-01-03 09:39:33 +00:00
progress_logger.go Hide `--progress-format` global flag (#965) 2023-11-08 08:29:22 +00:00
progress_logger_test.go Remove dependency on global state for the root command (#606) 2023-07-26 11:17:09 +00:00
root.go Consolidate environment variable interaction (#747) 2023-09-11 08:18:43 +00:00
user_agent.go Rename bricks -> databricks (#389) 2023-05-16 18:35:39 +02: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 Consolidate environment variable interaction (#747) 2023-09-11 08:18:43 +00:00
user_agent_upstream_test.go Let caller set BRICKS_UPSTREAM for user agent (#196) 2023-02-03 17:05:58 +01:00