Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
Types ¶
type Options ¶
type Options struct {
// You can use standard slog.HandlerOptions, that would be used in production
*slog.HandlerOptions
// Max number of printed elements in slice.
MaxSlicePrintSize uint
// If the attributes should be sorted by keys
SortKeys bool
// Time format for timestamp, default format is "[15:04:05]"
TimeFormat string
// Add blank line after each log
NewLineAfterLog bool
// Indent \n in strings
StringIndentation bool
// Set color for Debug level, default: devslog.Blue
DebugColor Color
// Set color for Info level, default: devslog.Green
InfoColor Color
// Set color for Warn level, default: devslog.Yellow
WarnColor Color
// Set color for Error level, default: devslog.Red
ErrorColor Color
// Max stack trace frames when unwrapping errors
MaxErrorStackTrace uint
// Use method String() for formatting value
StringerFormatter bool
// Disable coloring
NoColor bool
// Keep same color for whole source info, helpful when you want to open the line of code from terminal, but the ANSI coloring codes are in link itself
SameSourceInfoColor bool
}
Click to show internal directories.
Click to hide internal directories.