Documentation ¶
Overview ¶
Package logging implements machine logging sink.
Index ¶
- type LogEvent
- type LogSender
- type ZapCore
- func (core *ZapCore) Check(entry zapcore.Entry, checked *zapcore.CheckedEntry) *zapcore.CheckedEntry
- func (core *ZapCore) Close(ctx context.Context) error
- func (core *ZapCore) ConfigureInterface(ctx context.Context, iface string) error
- func (core *ZapCore) Enabled(zapcore.Level) bool
- func (core *ZapCore) Sync() error
- func (core *ZapCore) With(fields []zapcore.Field) zapcore.Core
- func (core *ZapCore) Write(entry zapcore.Entry, fields []zapcore.Field) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogEvent ¶
type LogEvent struct { Fields map[string]interface{} Time time.Time Msg string Level zapcore.Level }
LogEvent represents a log message to be send.
type LogSender ¶
type LogSender struct {
// contains filtered or unexported fields
}
LogSender writes zap logs to the remote destination.
func NewLogSender ¶
NewLogSender returns log sender that sends logs in JSON over TCP (newline-delimited) or UDP (one message per packet).
type ZapCore ¶
type ZapCore struct {
// contains filtered or unexported fields
}
ZapCore wrapper for forwarding log events to the siderolink logs endpoint.
func NewZapCore ¶
NewZapCore creates a new zap core.
func (*ZapCore) Check ¶
func (core *ZapCore) Check(entry zapcore.Entry, checked *zapcore.CheckedEntry) *zapcore.CheckedEntry
Check implements zapcore.core interface.
func (*ZapCore) ConfigureInterface ¶
ConfigureInterface inits the sender.
Click to show internal directories.
Click to hide internal directories.