add log.Infof()

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2023-12-31 05:00:13 -06:00
parent b0b8b762ab
commit 3410280bd7
2 changed files with 7 additions and 2 deletions

View File

@ -8,3 +8,8 @@ func Info(a ...any) {
if ! INFO { return }
golanglog.Println(a...)
}
func Infof(s string, a ...any) {
if ! INFO { return }
golanglog.Printf(s, a...)
}

4
log.go
View File

@ -58,12 +58,12 @@ func Get(flag string) bool {
// a simple way turn logging messages on and off
func Log(b bool, a ...any) {
if ! b { return }
golanglog.Println(a...)
origlog.Println(a...)
}
func Logf(b bool, s string, a ...any) {
if ! b { return }
golanglog.Printf(s, a...)
origlog.Printf(s, a...)
}
func Println(a ...any) {