capture

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package capture implements the Logger interface by capturing logged lines. This is useful for log inspection during unit-testing, if you want to assert that a particular line has, or has not, been logged.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {

	// Entries holds logged entries in submission order.
	Entries []string
	// contains filtered or unexported fields
}

Logger implements the log.Logger interface by capturing logged lines.

func New

func New() *Logger

func (*Logger) Log

func (logger *Logger) Log(v ...interface{})

func (*Logger) Logf

func (logger *Logger) Logf(format string, v ...interface{})

Jump to

Keyboard shortcuts

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