log

package
v0.0.0-...-ddf2229 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize(loggerInstance ILogger)

Types

type Fields

type Fields map[string]any

type ILogger

type ILogger interface {
	Info(ctx context.Context, msg string, fields Fields)
	Warn(ctx context.Context, msg string, fields Fields)
	Error(ctx context.Context, msg string, err error, fields Fields)
	Debug(ctx context.Context, msg string, fields Fields)
}
var (

	// Assigning default no-op logger. Later it will be replaced by actual logger(if provided) inside init function.
	Logger ILogger = newNoOpLogger()
)

type Level

type Level uint8
const (
	DebugLevel Level = iota
	Info
	Warn
	Error
)

type NoOpLogger

type NoOpLogger struct{}

func (NoOpLogger) Debug

func (n NoOpLogger) Debug(ctx context.Context, msg string, fields Fields)

func (NoOpLogger) Error

func (n NoOpLogger) Error(ctx context.Context, msg string, err error, fields Fields)

func (NoOpLogger) Info

func (n NoOpLogger) Info(ctx context.Context, msg string, fields Fields)

func (NoOpLogger) Warn

func (n NoOpLogger) Warn(ctx context.Context, msg string, fields Fields)

Jump to

Keyboard shortcuts

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