log

package
Version: v0.0.0-...-8e6450d Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CapturingLogger

type CapturingLogger struct {
	Lines []string
}

CapturingLogger is designed to be used in testing - it will saves lines it receives

func (*CapturingLogger) Fatal

func (c *CapturingLogger) Fatal(a ...interface{})

func (*CapturingLogger) Fatalf

func (c *CapturingLogger) Fatalf(s string, a ...interface{})

func (*CapturingLogger) Fatalln

func (c *CapturingLogger) Fatalln(a ...interface{})

func (*CapturingLogger) Panic

func (c *CapturingLogger) Panic(a ...interface{})

func (*CapturingLogger) Panicf

func (c *CapturingLogger) Panicf(s string, a ...interface{})

func (*CapturingLogger) Panicln

func (c *CapturingLogger) Panicln(a ...interface{})

func (*CapturingLogger) Print

func (c *CapturingLogger) Print(a ...interface{})

func (*CapturingLogger) Printf

func (c *CapturingLogger) Printf(s string, a ...interface{})

func (*CapturingLogger) Println

func (c *CapturingLogger) Println(a ...interface{})

type StdLogger

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

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

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

StdLogger is what your logrus-enabled library should take, that way it'll accept a stdlib logger and a logrus logger. There's no standard interface, this is the closest we get, unfortunately.

provide a mutable logger so it can be changed this is what the default logger in go's log pakcage looks like

Source Files

Jump to

Keyboard shortcuts

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