logger

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: MIT Imports: 1 Imported by: 11

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(format string, args ...interface{}) {})

NoOp logger

View Source
var Std = Func(func(format string, args ...interface{}) { 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 ...interface{})

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

func (Func) Logf

func (f Func) Logf(format string, args ...interface{})

Logf calls f(id)

type L

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

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