Documentation
¶
Index ¶
- func Critical(ctx context.Context, msg string, params ...interface{})
- func Debug(ctx context.Context, msg string, params ...interface{})
- func Error(ctx context.Context, msg string, params ...interface{})
- func Info(ctx context.Context, msg string, params ...interface{})
- func Log(evs ...Event)
- func SetDefaultLogger(l Logger)
- func Trace(ctx context.Context, msg string, params ...interface{})
- func Warn(ctx context.Context, msg string, params ...interface{})
- type Event
- type EventSet
- type Logger
- type MultiLogger
- type Severity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Critical ¶
Critical constructs a logging event with critical severity, and sends it via the default Logger
func Debug ¶
Debug constructs a logging event with debug severity, and sends it via the default Logger
func Error ¶
Critical constructs a logging event with error severity, and sends it via the default Logger
func SetDefaultLogger ¶
func SetDefaultLogger(l Logger)
Types ¶
type Event ¶
type Event struct { Context context.Context `json:"-"` Id string `json:"id"` Timestamp time.Time `json:"timestamp"` Severity Severity `json:"severity"` Message string `json:"message"` // Metadata are structured key-value pairs which describe the event. Metadata map[string]string `json:"meta,omitempty"` // Labels, like Metadata, are key-value pairs which describe the event. Unlike Metadata, these are intended to be // indexed. Labels map[string]string `json:"labels,omitempty"` }
An Event is a discrete logging event
type Logger ¶
A Logger is a way of outputting events.
func DefaultLogger ¶
func DefaultLogger() Logger
func SeelogLogger ¶
func SeelogLogger() Logger
type MultiLogger ¶
type MultiLogger []Logger
A MultiLogger sends invocations to multiple Loggers.
func (MultiLogger) Flush ¶
func (ls MultiLogger) Flush() error
func (MultiLogger) Log ¶
func (ls MultiLogger) Log(evs ...Event)
Click to show internal directories.
Click to hide internal directories.