Documentation ¶
Overview ¶
Package logvac handles the adding, removing, and writing to drains. It also defines the common types used accross logvac.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteMessage ¶
func WriteMessage(msg Message)
WriteMessage broadcasts to all drains in seperate go routines Returns once all drains have received the message, but may not have processed the message yet
Types ¶
type Logger ¶
type Logger interface { Fatal(string, ...interface{}) Error(string, ...interface{}) Warn(string, ...interface{}) Info(string, ...interface{}) Debug(string, ...interface{}) Trace(string, ...interface{}) }
Logger is a simple interface that's designed to be intentionally generic to allow many different types of Logger's to satisfy its interface
type Logvac ¶
type Logvac struct {
// contains filtered or unexported fields
}
Logvac defines the structure for the default logvac object
var Vac Logvac
Vac is the default logvac object
type Message ¶
type Message struct { Time time.Time `json:"time"` UTime int64 `json:"utime"` Id string `json:"id"` // ignoreifempty? Tag string `json:"tag"` // ignoreifempty? // []string? Type string `json:"type"` Priority int `json:"priority"` Content string `json:"message"` }
Message defines the structure of a log message
Click to show internal directories.
Click to hide internal directories.