Documentation
¶
Index ¶
- func ColorizeText(line string) string
- func FieldInt(obj map[string]interface{}, keys ...string) int64
- func FieldStr(obj map[string]interface{}, keys ...string) string
- func FormatDuration(ns int64) string
- func FormatJSON(obj map[string]interface{}) string
- func FormatLevel(level string) string
- func FormatLine(line string) string
- func FormatStatus(code int64) string
- func FormatTimestamp(ts string) string
- func FormatValue(v interface{}) string
- func MatchLevel(line, level string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColorizeText ¶
ColorizeText handles non-JSON log lines (plain text).
func FormatDuration ¶
FormatDuration formats nanoseconds as a human-readable duration.
func FormatJSON ¶
FormatJSON renders a structured JSON log line as a clean, colorized single line.
func FormatLevel ¶
FormatLevel returns a colorized, left-aligned level string.
func FormatLine ¶
FormatLine detects JSON log lines and formats them; falls back to text colorization.
func FormatStatus ¶
FormatStatus returns a colorized HTTP status code.
func FormatTimestamp ¶
FormatTimestamp converts an ISO timestamp to a friendlier format.
func FormatValue ¶
func FormatValue(v interface{}) string
FormatValue renders a JSON value as a short string for key=value display.
func MatchLevel ¶
MatchLevel checks if a log line contains a specific log level.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.