logger

package module
v0.0.0-...-f3fbb70 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxChunkCount maximal chunk per message count.
	// See http://docs.graylog.org/en/2.4/pages/gelf.html.
	MaxChunkCount = 128

	// DefaultChunkSize is default WAN chunk size.
	DefaultChunkSize = 1420

	// CompressionNone don't use compression.
	CompressionNone = 0

	// CompressionGzip use gzip compression.
	CompressionGzip = 1

	// CompressionZlib use zlib compression.
	CompressionZlib = 2
)

Variables

This section is empty.

Functions

func New

func New(configuration LoggingConfiguration) (*zap.Logger, error)

New creates new apilog.

func NewAccessLog

func NewAccessLog(handler http.Handler) http.Handler

func NewAccessLogWithFormat

func NewAccessLogWithFormat(handler http.Handler, format string) http.Handler

Types

type LoggingConfiguration

type LoggingConfiguration struct {
	GraylogAddress string
	AppName        string
	Hostname       string
}

Jump to

Keyboard shortcuts

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