ecslogs

package
v2.1.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2018 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package ecslogs provides the implementation of an event handler that outputs events in a ecslogs-compatible format.

Importing this package has the side effect of configuring the default logger to use an ecslogs handler if stdout is not a terminal.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Output  io.Writer
	Program string
	Pid     int
	// contains filtered or unexported fields
}

Handler is an event handler which formats events in a ecslogs-compatible format and writes them to its output.

It is safe to use a handler concurrently from multiple goroutines.

func NewHandler

func NewHandler(output io.Writer) *Handler

NewHandler creates a new handler which writes to output

func (*Handler) HandleEvent

func (h *Handler) HandleEvent(e *events.Event)

HandleEvent satisfies the events.Handler interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL