Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultDarkTheme = mustValidTheme(&typesv1.FormatConfig_Theme{ Key: fgstyle("#48df61"), Value: fgstyle("#8c887c"), Time: fgstyle("#9e9e9e"), Msg: fgstyle("#ffffff"), Levels: &typesv1.FormatConfig_LevelStyle{ Debug: fgstyle("#d33682"), Info: fgstyle("#2aa198"), Warn: fgstyle("#ff8800"), Error: fgstyle("#ff6a6a"), Panic: fgbdstyle("#ff6a6a", "#ffffff"), Fatal: fgbdstyle("#ff6a6a", "#ffff00"), Unknown: fgstyle("#a9a9a9"), }, AbsentMsg: fgstyle("#a9a9a9"), AbsentTime: fgstyle("#a9a9a9"), })
View Source
var DefaultLightTheme = mustValidTheme(&typesv1.FormatConfig_Theme{ Key: fgstyle("#146e23"), Value: fgstyle("#878376"), Time: fgstyle("#565454"), Msg: fgstyle("#000000"), Levels: &typesv1.FormatConfig_LevelStyle{ Debug: fgstyle("#d33682"), Info: fgstyle("#2aa198"), Warn: fgstyle("#ff8800"), Error: fgstyle("#d82626"), Panic: fgbdstyle("#d82626", "#ffffff"), Fatal: fgbdstyle("#d82626", "#ffff00"), Unknown: fgstyle("#a9a9a9"), }, AbsentMsg: fgstyle("#a9a9a9"), AbsentTime: fgstyle("#a9a9a9"), })
View Source
var DefaultStdioOpts = StdioOpts{ SkipUnchanged: true, SortLongest: true, TimeFormat: time.Stamp, TimeZone: time.Local, TruncateLength: 15, Truncates: false, AbsentMsgContent: "<no msg>", AbsentTimeContent: "<no time>", LightTheme: func(r *lipgloss.Renderer) (*Theme, error) { return ThemeFrom(r, DefaultLightTheme) }, DarkTheme: func(r *lipgloss.Renderer) (*Theme, error) { return ThemeFrom(r, DefaultDarkTheme) }, }
Functions ¶
func ValidateTheme ¶ added in v0.8.0
func ValidateTheme(v *typesv1.FormatConfig_Theme) error
Types ¶
type StdioOpts ¶
type StdioOpts struct {
Keep []string
Skip []string
SkipUnchanged bool
SortLongest bool
TimeFormat string
TimeZone *time.Location
TruncateLength int
Truncates bool
AbsentMsgContent string
AbsentTimeContent string
LightTheme func(r *lipgloss.Renderer) (*Theme, error)
DarkTheme func(r *lipgloss.Renderer) (*Theme, error)
}
func StdioOptsFrom ¶
func StdioOptsFrom(cfg *typesv1.FormatConfig) (StdioOpts, []error)
type Theme ¶ added in v0.8.0
type Theme struct {
Key lipgloss.Style
Val lipgloss.Style
Time lipgloss.Style
TimeAbsent lipgloss.Style
Msg lipgloss.Style
MsgAbsent lipgloss.Style
DebugLevel lipgloss.Style
InfoLevel lipgloss.Style
WarnLevel lipgloss.Style
ErrorLevel lipgloss.Style
PanicLevel lipgloss.Style
FatalLevel lipgloss.Style
UnknownLevel lipgloss.Style
}
Click to show internal directories.
Click to hide internal directories.