Documentation
¶
Overview ¶
Package woollog adapts a gortk log spec to a wool logger. New returns an io.Writer that buffers a process's output stream, parses each line with the spec (gortk.LogParser), and re-emits it through wool at the parsed severity level — the reusable form of the per-agent log writers (postgres, redis, …).
An agent supplies only a gortk.LogSpec (the prefix regex + level map) and the fields to surface; the buffering, line splitting, and level routing live here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer parses a log stream and routes each line to a wool logger at its parsed level. It implements io.Writer, so it drops in wherever a process's output is piped to wool (runner.WithOutput(...)).
func MustNew ¶
MustNew is New for package-level/start-up specs that are effectively constants; it panics on an invalid spec.