Documentation
¶
Index ¶
Constants ¶
View Source
const ( // VersionTag is mandatory VersionTag = "version" // Version of supported gelf format Version = "1.1" // HostTag is mandatory HostTag = "host" // LevelTag is mandatory LevelTag = "level" // MessageKey provides the key value for gelf message field MessageKey = "short_message" TimeKey = "timestamp" )
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(config Config) zapcore.WriteSyncer
New returns an implementation of ZapWriteSyncer which should be compatible with zap.WriteSyncer
func NewGelfCore ¶
func SyslogLevelEncoder ¶
func SyslogLevelEncoder(l zapcore.Level, enc zapcore.PrimitiveArrayEncoder)
ZapLevelToGelfLevel maps the zap log levels to the syslog severity levels used for gelf. See https://en.wikipedia.org/wiki/Syslog for details.
Types ¶
type Config ¶
Config represents the required settings for connecting the gelf data sink.
func NewDefaultConfig ¶
NewDefaultConfig provides a configuration with default values for port and chunk size.
Click to show internal directories.
Click to hide internal directories.