memongolog

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LogLevelDebug logs all messages
	LogLevelDebug = 2

	// LogLevelInfo logs a small number of information messages
	LogLevelInfo = 3

	// LogLevelWarn only logs messages that indicate a potential problem
	LogLevelWarn = 4

	// LogLevelSilent logs no messages
	LogLevelSilent = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LogLevel

type LogLevel int

LogLevel is a logging vebosity level

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger is a logger that filters by log level

func New

func New(out *log.Logger, level LogLevel) *Logger

New constructs a new logger

func (*Logger) Debugf

func (l *Logger) Debugf(format string, v ...interface{})

Debugf logs at the debug level

func (*Logger) Infof

func (l *Logger) Infof(format string, v ...interface{})

Infof logs at the info level

func (*Logger) Warnf

func (l *Logger) Warnf(format string, v ...interface{})

Warnf logs at the warning level

Jump to

Keyboard shortcuts

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