v0.12.0

charmbracelet/gumv0.12.0Nov 27, 2023by github-actions[bot]

AI Summary

This release introduces a new `log` command for structured logging with different levels and styling. It also includes improvements like pretty table printing and better handling of `--value` flags to avoid reading from stdin unnecessarily.

Key Highlights

  • New `log` command using the charmbracelet/log library
  • Pretty Table Print feature
  • Optimization to avoid reading from stdin when `--value` is used
  • Filter now works with lists as choose

New Features

  • log command
  • pretty table print
  • stdin optimization for --value
  • filter list support

Full Release Notes

# Gum Log 🪵

Version 0.12.0 of gum features a brand new `log` command. Gum `log` logs messages to the terminal at using different levels and styling using the [`charmbracelet/log`](https://github.com/charmbracelet/log) library.

To get started, simply run:

```
gum log
```

```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.

<img src="https://vhs.charm.sh/vhs-6jupuFM0s2fXiUrBE0I1vU.gif" width="600" alt="Running gum log with debug and error levels" />

## What's Changed

* Pretty Table Print by @maaslalani in https://github.com/charmbracelet/gum/pull/436
* Log command by @aymanbagabas in https://github.com/charmbracelet/gum/pull/449
* Avoid reading from stdin if `--value` is being used by @piero-vic in https://github.com/charmbracelet/gum/pull/448
* Made filter work with lists as choose by @MikaelFangel in https://github.com/charmbracelet/gum/pull/424

## New Contributors
* @cglong made their first contribution in https://github.com/charmbracelet/gum/pull/401
* @docwhat made their first contribution in https://github.com/charmbracelet/gum/pull/433
* @piero-vic made their first contribution in https://github.com/charmbracelet/gum/pull/448

**Full Changelog**: https://github.com/charmbracelet/gum/compare/v0.11.0...v0.12.0

---

<a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg" width="400"></a>

Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.technology/@charm), or on [Discord](https://charm.sh/chat).