Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLogWriter ¶
NewLogWriter wraps w with a writer that colorizes logrus-formatted lines. Pass a zero LogColors to disable colorization.
Types ¶
type LogColors ¶
type LogColors struct {
Debug string // debug level
Info string // info level
Warning string // warning level
Error string // error level
Message string // msg value — bright/white
Gray string // timestamps, keys, and field values
Reset string // reset all attributes
}
LogColors holds ANSI escape sequences used to colorize logrus-formatted log output.
func DefaultLogColors ¶
func DefaultLogColors() LogColors
DefaultLogColors returns the default color scheme for logrus-formatted log output, consistent with the progress and slog color palettes.
type TintFormatter ¶
type TintFormatter struct {
// TimeFormat controls the timestamp layout (default: time.DateTime).
TimeFormat string
}
TintFormatter is a logrus Formatter that produces output identical to the tint slog handler, so logrus-based libraries blend in with slog output.
Click to show internal directories.
Click to hide internal directories.