Documentation
¶
Index ¶
Constants ¶
View Source
const ( GrayConnTCP = "TCP" GrayConnUDP = "UDP" )
Connection types to use
View Source
const MaxPacketSize = 2 * 1024 * 1024
MaxPacketSize max allowed packet size in bytes
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conf ¶
type Conf struct {
AppName string // app version to encode
AppVersion string // app name to encode
PanicOnFail bool // panic if unable to init the zapcore
ZapMinLogLevel zapcore.Level // min log level to send
GrayLogHostname string // host address
GrayLogConnPort int // connection port
GrayLogConnType GrayConnType // udp or tcp
GrayLogConnPoolInit int // starting pool size
GrayLogConnPoolMax int // max Connection pool size
GrayLogConnTimeOut time.Duration // timeout in ms, default 2 seconds
GrayLogBufferCap int // capacity of log message buffer
GrayLogFlushTime int // flush timeout for log messages
}
Conf Config to setup the zap Core returned
type Core ¶
type Core struct {
zapcore.LevelEnabler // filter by severity
Context []zapcore.Field // zap context fields
// contains filtered or unexported fields
}
Core returned for use with zap
func (*Core) Check ¶
func (core *Core) Check(entry zapcore.Entry, checked *zapcore.CheckedEntry) *zapcore.CheckedEntry
Check determines whether the supplied entry should be logged.
type GrayConnType ¶
type GrayConnType string
GrayConnType Coonection type to graylog server, UDP or TCP
type Message ¶
type Message struct {
Version string `json:"version"`
Host string `json:"host"`
ShortMessage string `json:"short_message"`
FullMessage string `json:"full_message,omitempty"`
Timestamp int64 `json:"timestamp,omitempty"`
Level uint `json:"level,omitempty"`
}
Message represents a GELF formated message
Click to show internal directories.
Click to hide internal directories.