logger

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

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

Go to latest
Published: Jan 12, 2017 License: BSD-3-Clause Imports: 7 Imported by: 4

README

maturity build status GoDoc

logger

The logger package implements a service to print structured messages.

Documentation

Overview

Package logger implements github.com/the-anna-project/logger.Service. This logger interface is to simply log output to gather runtime information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

Types

type Service

type Service interface {
	// Log takes a sequence of alternating key/value pairs which are used to
	// create the log message structure.
	Log(v ...interface{}) error
}

Service is a simple interface describing services that emit messages to gather certain runtime information.

func NewService

func NewService(config ServiceConfig) (Service, error)

NewService creates a new configured service.

type ServiceConfig

type ServiceConfig struct {
	// Settings.
	Caller             kitlog.Valuer
	IOWriter           io.Writer
	TimestampFormatter kitlog.Valuer
}

ServiceConfig represents the configuration used to create a new service.

func DefaultServiceConfig

func DefaultServiceConfig() ServiceConfig

DefaultServiceConfig provides a default configuration to create a new service by best effort.

Jump to

Keyboard shortcuts

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