log

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2025 License: MIT Imports: 1 Imported by: 2

Documentation

Overview

Package log defines the framework's standard Logger interface. It provides both context-aware and context-unaware logging methods for distributed tracing support.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	Key   string
	Value any
}

Field is a generic key-value pair for structured logging.

type Logger

type Logger interface {
	// Context-unaware logging methods
	Info(msg string, fields ...Field)
	Error(msg string, err error, fields ...Field)
	Debug(msg string, fields ...Field)
	Warn(msg string, fields ...Field)

	// Context-aware logging methods for distributed tracing
	InfoC(ctx context.Context, msg string, fields ...Field)
	ErrorC(ctx context.Context, msg string, err error, fields ...Field)
	DebugC(ctx context.Context, msg string, fields ...Field)
	WarnC(ctx context.Context, msg string, err error, fields ...Field)
}

Logger defines the standard logging interface for the framework. All framework modules and user code should depend on this interface, not on concrete implementations.

Jump to

Keyboard shortcuts

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