log

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, vals ...interface{})

Debug logs to the debugLogFn if it is set. Noop default.

func Error

func Error(msg string, vals ...interface{})

Error logs to the errLogFn if it is set. stdlib log.Printf default.

func ErrorE

func ErrorE(msg string, vals ...interface{}) error

ErrorE is a temporary helper to replace logger.ErrorE from logxi

func Fatal

func Fatal(msg string, vals ...interface{})

Fatal is a temporary helper to replace logger.Fatal from logxi

func HasDebugLogger

func HasDebugLogger() bool

HasDebugLogger is a way to check for a noop on debug logging and pre-empt an expensive formatting call.

func HasErrLogger

func HasErrLogger() bool

HasErrLogger is a way to check for a noop on error logging and pre-empt an expensive formatting call.

func HasSQLLogger

func HasSQLLogger() bool

HasSQLLogger is a way to check for a noop on sql logging and pre-empt an expensive formatting call.

func SQL

func SQL(msg string, vals ...interface{})

SQL logs to the sqlLogFn if it is set. Noop default.

Types

type LogFunc

type LogFunc = func(string, ...interface{})
var (
	DebugLogFn LogFunc = nil
	SQLLogFn   LogFunc = nil
	ErrorLogFn LogFunc = nil
)

Jump to

Keyboard shortcuts

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