Documentation ¶
Overview ¶
Package parser provides utilities for parsing of structured log messsages generated by maddy.
Index ¶
Constants ¶
View Source
const (
ISO8601_UTC = "2006-01-02T15:04:05.000Z"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MalformedMsg ¶
func (MalformedMsg) Error ¶
func (m MalformedMsg) Error() string
type Msg ¶
type Msg struct { Stamp time.Time Debug bool Module string Message string Context map[string]interface{} }
func Parse ¶
Parse parses the message from the maddy log file.
It assumes standard file output, including the [debug] tag and ISO 8601 timestamp at the start of each line. Timestamp is assumed to be in the UTC, as it is enforced by maddy.
JSON context values are unmarshalled without any additional processing, notably that means that all numbers are represented as float64.
Click to show internal directories.
Click to hide internal directories.