github.com/hedzr/evendeep@v0.4.8/dbglog/log.go (about) 1 //go:build !delve && !verbose 2 // +build !delve,!verbose 3 4 package dbglog 5 6 import ( 7 "github.com/hedzr/log/color" 8 "gopkg.in/hedzr/errors.v3" 9 ) 10 11 // LogValid shows dbglog.Log is enabled or abandoned 12 const LogValid bool = false //nolint:gochecknoglobals //i know that 13 14 func SetLogEnabled() {} // enables dbglog.Log at runtime 15 func SetLogDisabled() {} // disables dbglog.Log at runtime 16 17 // DeferVisit moves errors in container ec, and log its via dbglog.Log 18 func DeferVisit(ec errors.Error, err *error) { 19 ec.Defer(err) 20 } 21 22 // Log will print formatted message while build-tags `delve` or `verbose` present. 23 // 24 // The flag dbglog.LogValid identify that state. 25 func Log(format string, args ...interface{}) { //nolint:goprintffuncname //no 26 27 } 28 29 func Err(format string, args ...interface{}) { //nolint:goprintffuncname //no 30 31 } 32 33 func Wrn(format string, args ...interface{}) { //nolint:goprintffuncname //so what 34 35 } 36 37 func Colored(clr color.Color, format string, args ...interface{}) { //nolint:goprintffuncname //so what 38 39 }