Documentation ¶
Index ¶
- Constants
- Variables
- type Graylog
- type Logger
- type Message
- func (m *Message) Send()
- func (m *Message) SetCode(code string) *Message
- func (m *Message) SetID(id string) *Message
- func (m *Message) SetLevel(level int) *Message
- func (message *Message) SetLineOfCode(code oerror.LineOfCode) *Message
- func (m *Message) SetMap(p map[string]interface{}) *Message
- func (m *Message) SetParams(p interface{}) *Message
- func (m *Message) ShouldSkip() bool
Constants ¶
View Source
const ( // EMERGENCY level - system is unusable EMERGENCY int = iota // ALERT level - action must be taken immediately ALERT // CRITICAL level - critical conditions CRITICAL // ERROR level - error conditions ERROR // WARNING level - warning conditions WARNING // NOTICE level - normal, but significant, condition NOTICE // INFO level - informational message INFO // DEBUG level DEBUG )
Variables ¶
View Source
var ( // DefaultParams that will be send to graylog DefaultParams = map[string]interface{}{} // GraylogHost env var GraylogHost = "" // GraylogPort env var GraylogPort = "" )
Functions ¶
This section is empty.
Types ¶
type Graylog ¶
type Graylog struct {
// contains filtered or unexported fields
}
Graylog logger
func (*Graylog) CreateMessage ¶
CreateMessage for graylog
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
Message object
func (*Message) SetLineOfCode ¶
func (message *Message) SetLineOfCode(code oerror.LineOfCode) *Message
func (*Message) SetMap ¶
SetMap will loop through the map and will add each entry as top level key for the message
func (*Message) ShouldSkip ¶
ShouldSkip checks the log level and do not log the messag if the level is too low
Click to show internal directories.
Click to hide internal directories.