Documentation ¶
Overview ¶
Jog is a structured logging library outputting JSON messages one per line.
Each logged event will have the following fields:
- Time: ISO 8601 format
- Type: type of the Go variable representing the event
- Data: details of the event
The format for the type is "IMPORTPATH#TYPE", for example "github.com/tv42/jog#unencodable".
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
A Logger represents a logger that takes Go variables as events and writes them to an io.Writer as JSON. Each logging operation makes a single call to the Writer's Write method and contains one complete log event. For high throughput logging, you may want to use a bufio.Writer. A Logger can be used simultaneously from multiple goroutines, Write calls happen one at a time.
Click to show internal directories.
Click to hide internal directories.