mirror of
https://github.com/charmbracelet/gum
synced 2024-05-03 23:13:14 +02:00
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:
parent
3a37defc82
commit
cd115c44e9
|
@ -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" />
|
||||
|
|
Loading…
Reference in a new issue