log

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2016 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package log provides simple convenience wrappers for logging.

Following convention, this provides functions for logging warnings, errors, information and debugging.

Index

Constants

This section is empty.

Variables

View Source
var IsDebugging = false

IsDebugging controls debugging output.

If this is true, debugging messages will be printed. Expensive debugging operations can be wrapped in `if log.IsDebugging {}`.

Functions

func Debug

func Debug(msg string, v ...interface{})

Debug prints an error severity DEBUG to the log.

Debug will only print if IsDebugging is true.

func Err

func Err(msg string, v ...interface{})

Err prints an error of severity ERROR to the log.

func Info

func Info(msg string, v ...interface{})

Info prints an error of severity INFO to the log.

func Warn

func Warn(msg string, v ...interface{})

Warn prints an error severity WARN to the log.

Types

type Receiver

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

Receiver can receive log messages from this package.

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

Logger is the destination for this package.

The logger that this prints to.

Jump to

Keyboard shortcuts

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