Skip to content
Myr

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 file

Take it

1package log23import (4	"charm.land/gum/v2/style"5)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:""`1819	MinLevel string `help:"Minimal level to show" default:"" env:"GUM_LOG_LEVEL"`2021	LevelStyle     style.Styles `embed:"" prefix:"level." help:"The style of the level being used" set:"defaultBold=true" envprefix:"GUM_LOG_LEVEL_"`22	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}