# README
logger
import "github.com/princjef/gomarkdoc/logger"
Package logger provides a simple console logger for reporting information about execution to stderr.
Index
type Level
Level defines valid logging levels for a Logger.
type Level int
const (
DebugLevel Level = iota + 1
InfoLevel
WarnLevel
ErrorLevel
)
type Logger
Logger provides basic logging capabilities at different logging levels.
type Logger interface {
Debug(a ...interface{})
Debugf(format string, a ...interface{})
Info(a ...interface{})
Infof(format string, a ...interface{})
Warn(a ...interface{})
Warnf(format string, a ...interface{})
Error(a ...interface{})
Errorf(format string, a ...interface{})
}
func New
func New(level Level, opts ...Option) Logger
New initializes a new Logger.
type Option
Option defines an option for configuring the logger.
type Option func(opts *options)
func WithField
func WithField(key string, value interface{}) Option
WithField sets the provided key/value pair for use on all logs.
Generated by gomarkdoc
# Constants
Valid logging levels.
Valid logging levels.
Valid logging levels.
Valid logging levels.
# Interfaces
No description provided by the author