Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToStructured ¶
Convert an unstructured message to a structured message in a consistent fashion.
This returns a value of the shape {"textPayload": <message>}
func ToUnstructured ¶
Convert a structured message to an unstructured message in a consistent fashion.
This treats `textPayload` specially as the message in the message, and includes all other fields after that
Types ¶
type Logger ¶
type Logger interface { // Log an unstructured text message (not newline-terminated) LogUnstructured(message string) // Log a structured message. LogStructured(message map[string]interface{}) }
A Logger handles sending log output to an appropriate place, per user configuration. It must handle both structured (arbitrary JSON) and unstructured (plain text) inputs, and can produce whatever format is appropriate for the destination.
Click to show internal directories.
Click to hide internal directories.