ulog

package
Version: v0.0.0-...-e40b768 Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package ulog exposes logging via a Go interface.

ulog has three implementations of the Logger interface: a Go standard library "log" package Logger and a test Logger that logs via a test's testing.TB.Logf. To use the test logger import "ulog/ulogtest".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

Logger is a log receptacle.

It puts your information somewhere for safekeeping.

var Log Logger = log.New(os.Stderr, "", log.LstdFlags)

Log is a Logger that prints to stderr, like the default log package.

var Null Logger = emptyLogger{}

Null is a logger that prints nothing.

Source Files

Directories

Path Synopsis
Package ulogtest implement the Logger interface via a test's testing.TB.Logf.
Package ulogtest implement the Logger interface via a test's testing.TB.Logf.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL