Documentation
¶
Index ¶
- Variables
- func ValidateTheme(v *typesv1.FormatConfig_Theme) error
- type ColorMode
- type Stdio
- func (std *Stdio) Close(ctx context.Context) error
- func (std *Stdio) Receive(ctx context.Context, ev *typesv1.Log) error
- func (std *Stdio) ReceiveSpan(ctx context.Context, span *typesv1.Span) error
- func (std *Stdio) ReceiveTable(ctx context.Context, table *typesv1.Table) error
- func (std *Stdio) ReceiveWithPostProcess(ctx context.Context, ev *typesv1.Log, postProcess func(string) string) error
- type StdioOpts
- type Theme
- type ThemeLog
- type ThemeSpan
- type ThemeTable
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultDarkTheme = mustValidTheme(&typesv1.FormatConfig_Theme{
Key: defaultDarkLogTheme.Key,
Value: defaultDarkLogTheme.Value,
Time: defaultDarkLogTheme.Time,
Msg: defaultDarkLogTheme.Msg,
AbsentMsg: defaultDarkLogTheme.AbsentMsg,
AbsentTime: defaultDarkLogTheme.AbsentTime,
Levels: defaultDarkLogTheme.Levels,
Logs: defaultDarkLogTheme,
Spans: defaultDarkSpanTheme,
Tables: defaultDarkTableTheme,
})
View Source
var DefaultLightTheme = mustValidTheme(&typesv1.FormatConfig_Theme{
Key: defaultLightLogTheme.Key,
Value: defaultLightLogTheme.Value,
Time: defaultLightLogTheme.Time,
Msg: defaultLightLogTheme.Msg,
AbsentMsg: defaultLightLogTheme.AbsentMsg,
AbsentTime: defaultLightLogTheme.AbsentTime,
Levels: defaultLightLogTheme.Levels,
Logs: defaultLightLogTheme,
Spans: defaultLightSpanTheme,
Tables: defaultLightTableTheme,
})
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>", AbsentParentSpanContent: "<no parent>", 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 Stdio ¶
type Stdio struct {
// contains filtered or unexported fields
}
func (*Stdio) ReceiveSpan ¶ added in v0.8.5
func (*Stdio) ReceiveTable ¶ added in v0.8.5
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
AbsentParentSpanContent string
ColorMode ColorMode
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 {
Logs *ThemeLog
Spans *ThemeSpan
Table *ThemeTable
}
type ThemeLog ¶ added in v0.8.5
type ThemeLog 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
}
func ThemeLogFrom ¶ added in v0.8.5
type ThemeSpan ¶ added in v0.8.5
type ThemeSpan struct {
TraceId lipgloss.Style
SpanId lipgloss.Style
TraceState lipgloss.Style
ParentSpanId lipgloss.Style
ParentSpanIdAbsent lipgloss.Style
Name lipgloss.Style
Kind lipgloss.Style
ServiceName lipgloss.Style
ScopeName lipgloss.Style
ScopeVersion lipgloss.Style
Time lipgloss.Style
Duration lipgloss.Style
ResourceKey lipgloss.Style
ResourceVal lipgloss.Style
AttributeKey lipgloss.Style
AttributeVal lipgloss.Style
StatusMessage lipgloss.Style
StatusCode lipgloss.Style
EventTime lipgloss.Style
EventName lipgloss.Style
EventKey lipgloss.Style
EventVal lipgloss.Style
LinkTraceID lipgloss.Style
LinkSpanID lipgloss.Style
LinkTraceState lipgloss.Style
LinkKey lipgloss.Style
LinkVal lipgloss.Style
}
func ThemeSpanFrom ¶ added in v0.8.5
type ThemeTable ¶ added in v0.8.5
func ThemeTableFrom ¶ added in v0.8.5
func ThemeTableFrom(r *lipgloss.Renderer, theme *typesv1.FormatConfig_Theme) (*ThemeTable, error)
Click to show internal directories.
Click to hide internal directories.