logging

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Finished

type Finished func()

Finished defines a function to be returned by logging methods which contain timers

type Logger

type Logger interface {
	Log() hclog.Logger
	ServiceStart(address, port string)
	HealthHandlerCalled() Finished
}

Logger defines an interface for common logging operations

func New

func New(name, statsDServer, logLevel string) (Logger, error)

New creates a new logger with the given name and points it at a statsd server

type LoggerImpl

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

LoggerImpl is a concrete implementation for the logger function

func (*LoggerImpl) HealthHandlerCalled

func (l *LoggerImpl) HealthHandlerCalled() Finished

HealthHandlerCalled logs information when the health handler is called, the returned function must be called once work has completed

func (*LoggerImpl) Log

func (l *LoggerImpl) Log() hclog.Logger

Log returns the underlying logger

func (*LoggerImpl) ServiceStart

func (l *LoggerImpl) ServiceStart(address, port string)

ServiceStart logs information about the service start

Jump to

Keyboard shortcuts

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