log

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2018 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package log provides an interface for a generic logging solution for Go projects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InfoLogger

type InfoLogger interface {
	// Infof logs a formatted non-error message.
	Infof(format string, args ...interface{})
}

An InfoLogger represents the ability to log informational messages.

type Logger

type Logger interface {
	// All Loggers implement InfoLogger.  Calling InfoLogger methods directly on
	// a Logger value is equivalent to calling them on a V(1) InfoLogger.  For
	// example, logger.Info() produces the same result as logger.V(1).Info.
	InfoLogger

	// Error logs an error message.  This is behaviorally akin to fmt.Println.
	Error(args ...interface{})

	// Errorf logs a formatted error message.
	Errorf(format string, args ...interface{})

	// V returns an InfoLogger value for a specific verbosity level. A higher
	// verbosity level means a log message is less important.
	V(level int) InfoLogger

	// NewWithPrefix returns a Logger which prefixes all messages.
	WithPrefix(prefix string) Logger
}

A Logger represents the ability to log informational and error messages.

Directories

Path Synopsis
Package log provides a stdlib log implementation of the Logger interface.
Package log provides a stdlib log implementation of the Logger interface.

Jump to

Keyboard shortcuts

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