package
1.1.0
Repository: https://github.com/princjef/gomarkdoc.git
Documentation: pkg.go.dev

# 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

Valid logging levels

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

# Functions

New initializes a new Logger.
WithField sets the provided key/value pair for use on all logs.

# Constants

Valid logging levels.
Valid logging levels.
Valid logging levels.
Valid logging levels.

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author