Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrEncoder ¶ added in v0.13.0
type ErrEncoder struct {
// contains filtered or unexported fields
}
ErrEncoder is an io.Writer that converts all log messages into a stream of kes.ErrorEvents.
An ErrEncoder should be used when converting log messages to JSON.
func NewErrEncoder ¶ added in v0.13.0
func NewErrEncoder(w io.Writer) *ErrEncoder
NewErrEncoder returns a new ErrEncoder that writes kes.ErrorEvents to w.
func (*ErrEncoder) Write ¶ added in v0.13.0
func (w *ErrEncoder) Write(p []byte) (int, error)
Write converts p into an kes.ErrorEvent and writes its JSON representation to the underlying io.Writer.
func (*ErrEncoder) WriteString ¶ added in v0.13.0
func (w *ErrEncoder) WriteString(s string) (int, error)
WriteString converts s into an kes.ErrorEvent and writes its JSON representation to the underlying io.Writer.
type Target ¶ added in v0.13.0
type Target struct {
// contains filtered or unexported fields
}
Target groups a set of logging targets.
A message that gets written to the Target.Log will be sent to all logging targets.
func NewTarget ¶ added in v0.13.0
NewTarget creates a new group of logging targets from the given targets. Dublicate or nil targets will be filtered out.
If no targets are provided the returned Target will discard any log messages.
func (*Target) Add ¶ added in v0.13.0
Add adds the given target to the set of logging targets.
It does not add the given target if it is already in the set of logging targets nor if it is nil.