Files
remark42/backend/vendor/github.com/go-pkgz/auth/logger/logger.go
T

21 lines
552 B
Go

package logger
import "log"
// L defines minimal interface used to log things
type L interface {
Logf(format string, args ...interface{})
}
// Func type is an adapter to allow the use of ordinary functions as Logger.
type Func func(format string, args ...interface{})
// Logf calls f(id)
func (f Func) Logf(format string, args ...interface{}) { f(format, args...) }
// NoOp logger
var NoOp = Func(func(format string, args ...interface{}) {})
// Std logger
var Std = Func(func(format string, args ...interface{}) { log.Printf(format, args...) })