errors

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogLevel

type LogLevel int

LogLevel defines the level of logging

const (
	// DebugLogLevel represents the debug log level
	DebugLogLevel LogLevel = iota
	// InfoLogLevel represents the info log level
	InfoLogLevel
	// WarnLogLevel represents the warning log level
	WarnLogLevel
	// ErrorLogLevel represents the error log level
	ErrorLogLevel
	// PanicLogLevel represents the panic log level
	PanicLogLevel
	// FatalLogLevel represents the fatal log level
	FatalLogLevel
)

type Logger

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

Logger is a structure that implements logging

func NewLogger

func NewLogger(level string) *Logger

NewLogger creates a new instance of the Logger

func (*Logger) Debug

func (l *Logger) Debug(message string, args ...map[string]interface{})

Debug logs a debug message

func (*Logger) Error

func (l *Logger) Error(message string, err error, args ...interface{})

Error logs an error message

func (*Logger) Fatal

func (l *Logger) Fatal(message string, args ...interface{})

Fatal logs a fatal message

func (*Logger) Info

func (l *Logger) Info(message string, args ...interface{})

Info logs an info message

func (*Logger) Panic

func (l *Logger) Panic(message string, args ...interface{})

Panic logs a panic message

func (*Logger) Warn

func (l *Logger) Warn(message string, args ...interface{})

Warn logs a warning message

Jump to

Keyboard shortcuts

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