klogger

package
v0.4.159 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeLogger

func InitializeLogger(logLevel LogLevel)

InitializeLogger initializes the global logger with the specified log level

Types

type CustomLogger

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

CustomLogger represents the custom logger struct

var Logger *CustomLogger

GlobalLogger is a global instance of CustomLogger

func NewCustomLogger

func NewCustomLogger(logLevel LogLevel) *CustomLogger

NewCustomLogger creates a new instance of CustomLogger with the specified log level

func (*CustomLogger) Error

func (cl *CustomLogger) Error(message string)

Error logs an error message

func (*CustomLogger) Info

func (cl *CustomLogger) Info(message string)

Info logs an informational message

func (*CustomLogger) Warning

func (cl *CustomLogger) Warning(message string)

Warning logs a warning message

type LogLevel

type LogLevel int

LogLevel represents different log levels

const (
	// LogLevelInfo represents the log level for informational messages
	LogLevelInfo LogLevel = iota
	// LogLevelWarning represents the log level for warning messages
	LogLevelWarning
	// LogLevelError represents the log level for error messages
	LogLevelError
)

Jump to

Keyboard shortcuts

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