logging

package module
v0.0.0-...-8011c3a Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2019 License: MIT Imports: 2 Imported by: 0

README

logging

Documentation

Overview

Package logging presents interface (and its implementation sets) of a structured logger for Go. The interface is focused on the GELF Payload Specification logging format (http://docs.graylog.org/en/2.4/pages/gelf.html), but provides support for the universal use of logging. Recommendations for the implementation of GELF Payload Specification field formatting: - "version" - adds the sender of the message to the log. - "host" - adds the used hook (for example, GrayLog Hook). - "short_message" - adds the sender of the message to the log. - "full_message" - adds the sender of the message to the log. - "timestamp" - adds logging. - "level" - adds the sender of the message to the log. - "facility" - adds the sender of the message to the log. - "line" - adds a used hook (for example, GrayLog Hook). - "file" - adds a used hook (for example, GrayLog Hook). - additional fields - adds the sender of the message to the log.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry interface {
	Debug(args ...interface{})
	Info(args ...interface{})
	Warning(args ...interface{})
	Error(args ...interface{})
	Fatal(args ...interface{})
	GracefulFatal(ctx context.Context)
	Panic(args ...interface{})
	Writer() *io.PipeWriter
	WithValues(v Values) Entry
	GetValues() Values
	FromContext(ctx context.Context) Entry
	NewContext(ctx context.Context) context.Context
}

Entry provides recording to logging.

type Logger

type Logger interface {
	Entry
	AddHooks(hooks ...interface{}) error
}

Logger provides logging functionality.

type Values

type Values map[string]interface{}

Values built in type for processing fields in context.

Directories

Path Synopsis
Package logrus represents implementations the interface logging.Log.
Package logrus represents implementations the interface logging.Log.

Jump to

Keyboard shortcuts

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