log

package
v0.0.0-...-ec9fd1c Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2012 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package log provides an interface for multi-level logging.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Criticalf

func Criticalf(format string, args ...interface{})

Criticalf calls Criticalf on the default logger. Arguments are handled in the manner of fmt.Printf.

func Debugf

func Debugf(format string, args ...interface{})

Debugf calls Debugf on the default logger. Arguments are handled in the manner of fmt.Printf.

func Errorf

func Errorf(format string, args ...interface{})

Errorf calls Errorf on the default logger. Arguments are handled in the manner of fmt.Printf.

func Infof

func Infof(format string, args ...interface{})

Infof calls Infof on the default logger. Arguments are handled in the manner of fmt.Printf.

func Warningf

func Warningf(format string, args ...interface{})

Warningf calls Warningf on the default logger. Arguments are handled in the manner of fmt.Printf.

Types

type Logger

type Logger interface {
	// Debugf formats its arguments according to the format, analogous to fmt.Printf,
	// and records the text as a log message at Debug level.
	Debugf(format string, args ...interface{})

	// Infof is like Debugf, but at Info level.
	Infof(format string, args ...interface{})

	// Warningf is like Debugf, but at Warning level.
	Warningf(format string, args ...interface{})

	// Errorf is like Debugf, but at Error level.
	Errorf(format string, args ...interface{})

	// Criticalf is like Debugf, but at Critical level.
	Criticalf(format string, args ...interface{})
}

A type that implements Logger can output multi-level log messages.

var Default Logger = New(os.Stderr)

Default logger

func New

func New(w io.Writer) Logger

New creates a logger that serializes writes to w.

Jump to

Keyboard shortcuts

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