From 12ef4d30853c27e3dfbfaefe91e2ec9fb9b893c0 Mon Sep 17 00:00:00 2001 From: Maas Lalani Date: Wed, 8 Nov 2023 10:59:16 -0500 Subject: [PATCH] docs(log): add log to the readme --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 3b6139f..c5503b6 100644 --- a/README.md +++ b/README.md @@ -380,6 +380,23 @@ named emojis see the [GitHub API](https://api.github.com/emojis). Running gum format for different types of formats +## Log + +`log` logs messages to the terminal at using different levels and styling using +the [`charmbracelet/log`](https://github.com/charmbracelet/log) library. + +```bash +# Log some debug information. +gum log --structured --level debug "Creating file..." name file.txt +# DEBUG Unable to create file. name=temp.txt + +# Log some error. +gum log --structured --level error "Unable to create file." name file.txt +# ERROR Unable to create file. name=temp.txt +``` + +See [`charmbracelet/log`](https://github.com/charmbracelet/log) for more usage. + ## Examples See the [examples](./examples/) directory for more real world use cases.