log

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string)

Debug writes debug level messages using the package logger

func Debugf

func Debugf(fmt string, inf ...interface{})

Debugf writes formatted debug level messages using the package logger

func Info

func Info(msg string)

Info writes info level messages using the package logger

func Infof

func Infof(fmt string, inf ...interface{})

Infof writes formatted info level messages with the package logger

func IsDebug added in v1.2.0

func IsDebug() bool

IsDebug returns true if the package logger is at Debug level

func SetLogger

func SetLogger(l Logger)

SetLogger sets the package logger

Types

type Logger

type Logger interface {
	Info(string)
	Infof(string, ...interface{})
	Debug(string)
	Debugf(string, ...interface{})
	IsDebug() bool
}

Logger is a simple interface that handles Info and Debug logging

func GetLogger

func GetLogger() Logger

GetLogger returns the package logger

func NewDebugLogger added in v1.2.0

func NewDebugLogger() Logger

func NewNilLogger added in v1.2.0

func NewNilLogger() Logger

Jump to

Keyboard shortcuts

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