Add example and help for gum log --time option to README (#472)

* docs(log): add help for `--time` option

The `gum log --help` output for `--time` option says

```
-t, --time=""             The time format to use (kitchen, layout, ansic, rfc822, etc...)
```

with no indication of what `etc...` means. This is probably inferred for proficient Go programmers, but not for everyone else.

This commit makes it clearer which options are supported by `--time` by linking to the docs for the `time` library,

* Update README.md

* Update README.md

---------

Co-authored-by: Maas Lalani <maas@lalani.dev>
This commit is contained in:
Kevin Ernst 2024-01-12 14:31:18 -05:00 committed by GitHub
parent 3a37defc82
commit cd115c44e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -393,8 +393,13 @@ gum log --structured --level debug "Creating file..." name file.txt
# Log some error.
gum log --structured --level error "Unable to create file." name file.txt
# ERROR Unable to create file. name=temp.txt
# Include a timestamp.
gum log --time rfc822 --level error "Unable to create file."
```
See the Go [`time` package](https://pkg.go.dev/time#pkg-constants) for acceptable `--time` formats.
See [`charmbracelet/log`](https://github.com/charmbracelet/log) for more usage.
<img src="https://vhs.charm.sh/vhs-6jupuFM0s2fXiUrBE0I1vU.gif" width="600" alt="Running gum log with debug and error levels" />