logging

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

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

Go to latest
Published: Jan 8, 2020 License: MIT Imports: 3 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

logging

GoDoc

Package logging provides a simple interface of the log.Logger type.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyLogger

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

DummyLogger is a dummy implementation of Logger that simply records the messages logged to it.

func NewDummyLogger

func NewDummyLogger() *DummyLogger

NewDummyLogger creates a new, empty DummyLogger.

func (*DummyLogger) AssertLogged

func (d *DummyLogger) AssertLogged(t test.T, format string, v ...interface{})

AssertLogged asserts that the message specified was logged to the DummyLogger.

func (*DummyLogger) Printf

func (d *DummyLogger) Printf(format string, v ...interface{})

Printf records a message into the DummyLogger.

type Logger

type Logger interface {
	Printf(format string, v ...interface{})
}

Logger defines the methods that any logging type must implement. It is designed specifically to allow a *log.Logger to be resolved in dependency injection.

Jump to

Keyboard shortcuts

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