standardlog

package module
v0.0.0-...-04a4bc5 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2014 License: Apache-2.0 Imports: 0 Imported by: 4

README

Standardlog

wercker status

The go 1 compatibility promise prevents the standard library from changing log.Logger to be an interface.

This library has one single goal: to provide an interface that matches the functions in log.Logger so that you can substitute the standard Logger with a replacement if needed.

Usage

go get -u github.com/joefitzgerald/standardlog

import (
	"os"

	"github.com/joefitzgerald/standardlog"
)

func main() {
  var l standardlog.Logger
  l = log.New(os.Stdout, "", 0)
  // Use l here...
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Fatal(v ...interface{})
	Fatalf(format string, v ...interface{})
	Fatalln(v ...interface{})
	Flags() int
	Output(calldepth int, s string) error
	Panic(v ...interface{})
	Panicf(format string, v ...interface{})
	Panicln(v ...interface{})
	Prefix() string
	Print(v ...interface{})
	Printf(format string, v ...interface{})
	Println(v ...interface{})
	SetFlags(flag int)
	SetPrefix(prefix string)
}

Logger represents log.Logger functions from the standard library

Jump to

Keyboard shortcuts

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