std

package module
v0.0.0-...-cfa80b7 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2015 License: MIT Imports: 0 Imported by: 9

README

go-stdlogger

The Go Standard Logging Interface. Plain and simple.

// Logger describes a logger interface that is compatible with the standard
// log.Logger but also logrus and others. As not to limit which loggers can and
// can't be used with the API.
//
// This interface is from https://godoc.org/github.com/Sirupsen/logrus#StdLogger
type Logger interface {
    Print(...interface{})
    Printf(string, ...interface{})
    Println(...interface{})

    Fatal(...interface{})
    Fatalf(string, ...interface{})
    Fatalln(...interface{})

    Panic(...interface{})
    Panicf(string, ...interface{})
    Panicln(...interface{})
}

Documentation

Overview

Package std is the missing standard logging interface that should be present within Go. This entire package exposes a single "Logger" interface so that I don't need to pull in a huge dependency tree everytime I want to use this interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

	Fatal(...interface{})
	Fatalf(string, ...interface{})
	Fatalln(...interface{})

	Panic(...interface{})
	Panicf(string, ...interface{})
	Panicln(...interface{})
}

Logger describes a logger interface that is compatible with the standard log.Logger but also logrus and others. As not to limit which loggers can and can't be used with the API.

This interface is from https://godoc.org/github.com/Sirupsen/logrus#StdLogger

Jump to

Keyboard shortcuts

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