log

package
v0.0.0-...-e22d87d Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package log implements a convenient wrapper for the Go stdlib log.Logger that can used in the different go-mail-middleware modules

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

type Level int

Level is a type wrapper for an int

const (
	// LevelError is the Level for only ERROR log messages
	LevelError Level = iota
	// LevelWarn is the Level for WARN and higher log messages
	LevelWarn
	// LevelInfo is the Level for INFO and higher log messages
	LevelInfo
	// LevelDebug is the Level for DEBUG and higher log messages
	LevelDebug
)

type Logger

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

Logger represents the main Logger type

func New

func New(o io.Writer, p string, l Level) *Logger

New returns a new log.Logger type for the corresponding Middleware to use

func (*Logger) Debug

func (l *Logger) Debug(v ...interface{})

Debug performs a print() on the debug logger

func (*Logger) Debugf

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

Debugf performs a Printf() on the debug logger

func (*Logger) Error

func (l *Logger) Error(v ...interface{})

Error performs a print() on the error logger

func (*Logger) Errorf

func (l *Logger) Errorf(f string, v ...interface{})

Errorf performs a Printf() on the error logger

func (*Logger) Info

func (l *Logger) Info(v ...interface{})

Info performs a print() on the info logger

func (*Logger) Infof

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

Infof performs a Printf() on the info logger

func (*Logger) Warn

func (l *Logger) Warn(v ...interface{})

Warn performs a print() on the warn logger

func (*Logger) Warnf

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

Warnf performs a Printf() on the warn logger

Jump to

Keyboard shortcuts

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