logger

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package logger defines an interface that is used to log events and metrics during execution

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	Init()               // Initialise the logger
	Queued(url string)   // Queued is called each time a url is successfully queued
	Starting(url string) // Starting is called each time a url starts processing
	Finished(url string, code int, latency time.Duration,
		urls, errors int) // Finished is called each time a URL successfully finishes processing (even for non-200 results)
	Error(url string, err error) // Error is called on every error
	Exit()                       // Exit is called when the queue has finished and the logger should finalise
}

Interface is used to log events and metrics during execution

Directories

Path Synopsis
Package consolelogger defines a logger.Interface that emits logs to a writer (usually the console)
Package consolelogger defines a logger.Interface that emits logs to a writer (usually the console)
Package mocklogger defines a logger.Interface that stores a string representation of each logged event for testing
Package mocklogger defines a logger.Interface that stores a string representation of each logged event for testing

Jump to

Keyboard shortcuts

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