aboutsummaryrefslogtreecommitdiff
path: root/message/message.go
blob: 72e3c40ba21367eabe8172d2f2f90018dd17e06c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package message

import "time"

// Message type for implementors of the Writer interface.
type Message struct {
	// Optional logger name
	Name string
	// The time log() was called
	Time time.Time
	// The log level
	Level Level
	// The message content
	Content string
	// Optional fields for the logger
	Fields map[string]interface{}
	// Optional extras for this log message
	Extras []interface{}
}

// Writer interface for writing messages.
type Writer interface {
	Write(Message)
}