options.go
This file
Path
log/options.go
28 lines · 1.8 KiB · Go
Last changed by
chore: prepare v2 (#1116)Drew Smirnoffbefore adoption02d6f06
History of this fileTake it
The walk stopped after 200 commits: lines older than 6837ed2 point at it.
feat(deps): bump github.com/charmbracelet/bubbletea from 0.27.0 to 1.0.0 (#661)dependabot[bot]before adoption6837ed2
lines 1–3why, one step back1package log23import (chore: prepare v2 (#1116)Drew Smirnoffbefore adoption02d6f06
line 4why, one step back4 "charm.land/gum/v2/style"feat(deps): bump github.com/charmbracelet/bubbletea from 0.27.0 to 1.0.0 (#661)dependabot[bot]before adoption6837ed2
lines 5–18why, one step back5)67// Options is the set of options that can configure a join.8type Options struct {9 Text []string `arg:"" help:"Text to log"`1011 File string `short:"o" help:"Log to file"`12 Format bool `short:"f" help:"Format message using printf" xor:"format,structured"`13 Formatter string `help:"The log formatter to use" enum:"json,logfmt,text" default:"text"`14 Level string `short:"l" help:"The log level to use" enum:"none,debug,info,warn,error,fatal" default:"none"`15 Prefix string `help:"Prefix to print before the message"`16 Structured bool `short:"s" help:"Use structured logging" xor:"format,structured"`17 Time string `short:"t" help:"The time format to use (kitchen, layout, ansic, rfc822, etc...)" default:""`18feat(log): support setting minimum log level with GUM_LOG_LEVEL (#723)Carlos Alexandro Beckerbefore adoption1ffe8b7
lines 19–20why, one step back19 MinLevel string `help:"Minimal level to show" default:"" env:"GUM_LOG_LEVEL"`20fix: lint issues (#909)Carlos Alexandro Beckerbefore adoption817c4bd
line 21why, one step back21 LevelStyle style.Styles `embed:"" prefix:"level." help:"The style of the level being used" set:"defaultBold=true" envprefix:"GUM_LOG_LEVEL_"`feat(deps): bump github.com/charmbracelet/bubbletea from 0.27.0 to 1.0.0 (#661)dependabot[bot]before adoption6837ed2
lines 22–28why, one step back22 TimeStyle style.Styles `embed:"" prefix:"time." help:"The style of the time" envprefix:"GUM_LOG_TIME_"`23 PrefixStyle style.Styles `embed:"" prefix:"prefix." help:"The style of the prefix" set:"defaultBold=true" set:"defaultFaint=true" envprefix:"GUM_LOG_PREFIX_"` //nolint:staticcheck24 MessageStyle style.Styles `embed:"" prefix:"message." help:"The style of the message" envprefix:"GUM_LOG_MESSAGE_"`25 KeyStyle style.Styles `embed:"" prefix:"key." help:"The style of the key" set:"defaultFaint=true" envprefix:"GUM_LOG_KEY_"`26 ValueStyle style.Styles `embed:"" prefix:"value." help:"The style of the value" envprefix:"GUM_LOG_VALUE_"`27 SeparatorStyle style.Styles `embed:"" prefix:"separator." help:"The style of the separator" set:"defaultFaint=true" envprefix:"GUM_LOG_SEPARATOR_"`28}