logger

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	*log.Logger
	// contains filtered or unexported fields
}

Logger is a custom logger with debug levels.

func New

func New(debugLevel int, verbose bool) *Logger

New creates and returns a new Logger instance with specified debug level and verbosity.

func (*Logger) Debug

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

Debug logs a debug message if the debug level is set to 1 or higher.

func (*Logger) Error added in v1.0.4

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

Error logs an error message.

func (*Logger) Fatalf

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

Fatalf logs a fatal error message and terminates the program.

func (*Logger) Info

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

Info logs an informational message if the debug level is sufficient.

func (*Logger) Warn added in v1.0.4

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

Warn logs a warning message.

Jump to

Keyboard shortcuts

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