Documentation
¶
Overview ¶
Package logutil provides structured logger constructors for daemon and local (stderr) logging.
Index ¶
Constants ¶
View Source
const TimestampFormat = "2006-01-02T15:04:05.000Z"
Variables ¶
This section is empty.
Functions ¶
func NewJSONLogger ¶
NewJSONLogger returns a *slog.Logger writing structured JSON to w. Used for daemon file logs; JSON format is Loki/Promtail-compatible.
Types ¶
type TimestampWriter ¶
TimestampWriter wraps an io.Writer and prepends an ISO 8601 timestamp to each line before passing it through.
Click to show internal directories.
Click to hide internal directories.