log: github.com/apex/log/handlers/es Index | Files

package es

import "github.com/apex/log/handlers/es"

Package es implements an Elasticsearch batch handler. Currently this implementation assumes the index format of "logs-YY-MM-DD".

Index

Package Files

es.go

type Config Uses

type Config struct {
    BufferSize int           // BufferSize is the number of logs to buffer before flush (default: 100)
    Format     string        // Format for index
    Client     Elasticsearch // Client for ES
}

Config for handler.

type Elasticsearch Uses

type Elasticsearch interface {
    Bulk(io.Reader) error
}

Elasticsearch interface.

type Handler Uses

type Handler struct {
    *Config
    // contains filtered or unexported fields
}

Handler implementation.

func New Uses

func New(config *Config) *Handler

New handler with BufferSize

func (*Handler) HandleLog Uses

func (h *Handler) HandleLog(e *log.Entry) error

HandleLog implements log.Handler.

Package es imports 6 packages (graph) and is imported by 2 packages. Updated 2018-03-24. Refresh now. Tools for package owners.