log

package
v0.0.0-...-57ebffe Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string)

func Error

func Error(msg string)

func Fatal

func Fatal(msg string)

func Info

func Info(msg string)

Types

type LogOutput

type LogOutput int

logging by instance

const (
	FileOutput LogOutput = iota
	ConsoleOutput
)

type Logger

type Logger interface {
	Debug(msg string)
	Info(msg string)
	Error(msg string)
	Fatal(msg string)
}

func New

func New(outputmap map[LogOutput]io.Writer) Logger

to add console writer you need to add this value in map ConsoleOutput : os.Stdout to add file log writer add this in map FileOutput : io.Writer (this is open io writer to file)

Jump to

Keyboard shortcuts

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