logger

package
v2.1.4 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: MIT Imports: 1 Imported by: 1

Documentation

Overview

Package logger defines interface for logging. Implementation should be passed by user. Also provides NoOp (do-nothing) and Std (redirect to std log) predefined loggers.

Index

Constants

This section is empty.

Variables

View Source
var NoOp = Func(func(string, ...any) {})

NoOp logger

View Source
var Std = Func(func(format string, args ...any) { log.Printf(format, args...) })

Std logger sends to std default logger directly

Functions

This section is empty.

Types

type Func

type Func func(format string, args ...any)

Func type is an adapter to allow the use of ordinary functions as Logger.

func (Func) Logf

func (f Func) Logf(format string, args ...any)

Logf calls f(id)

type L

type L interface {
	Logf(format string, args ...any)
}

L defined logger interface used everywhere in the package

Jump to

Keyboard shortcuts

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