http

package
v0.0.0-...-d8f8204 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Target

type Target struct {
	// contains filtered or unexported fields
}

Target implements logger.Target and sends the json format of a log entry to the configured http endpoint. An internal buffer of logs is maintained but when the buffer is full, new logs are just ignored and an error is returned to the caller.

func New

func New(endpoint, userAgent, logKind string, transport *gohttp.Transport) *Target

New initializes a new logger target which sends log over http to the specified endpoint

func (*Target) Send

func (h *Target) Send(entry interface{}, errKind string) error

Send log message 'e' to http target.

Jump to

Keyboard shortcuts

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