databricks-cli/cmd
Pieter Noordhuis 32a29c6af4
Add structured logging infrastructure (#246)
New global flags:
* `--log-file FILE`: can be literal `stdout`, `stderr`, or a file name (default `stderr`)
* `--log-level LEVEL`: can be `error`, `warn`, `info`, `debug`, `trace`, or `disabled` (default `disabled`)
* `--log-format TYPE`: can be `text` or `json` (default `text`)

New functions in the `log` package take a `context.Context` and retrieve
the logger from said context.

Because we carry the logger in a context, adding
[attributes](https://pkg.go.dev/golang.org/x/exp/slog#hdr-Attrs_and_Values)
to the logger can be done as follows:

```go
ctx = log.NewContext(ctx, log.GetLogger(ctx).With("foo", "bar"))
```
2023-03-16 14:46:53 +01:00
..
api Update databricks-sdk-go to latest (#102) 2022-11-24 21:41:57 +01:00
auth bricks auth profiles tweaks (#178) 2023-01-24 15:54:28 +01:00
bundle Add openapi descriptions to bundle resources (#229) 2023-03-15 03:18:51 +01:00
configure Run unit tests on windows and macos (#103) 2022-11-28 11:34:25 +01:00
fs Store project object in context.Context instead of global (#61) 2022-09-16 11:06:58 +02:00
init Add environments to project configuration (#68) 2022-09-22 13:40:11 +02:00
prompt Store project object in context.Context instead of global (#61) 2022-09-16 11:06:58 +02:00
root Add structured logging infrastructure (#246) 2023-03-16 14:46:53 +01:00
sync Add optional JSON output for sync command (#230) 2023-03-08 10:27:19 +01:00
version Include build information and add version command (#194) 2023-02-03 15:38:53 +01:00