From ef61eb494b42a7bc226de1edc114579ce530abdd Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 7 Nov 2024 01:23:43 -0600 Subject: try allowing switching to writing to http --- log.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'log.go') diff --git a/log.go b/log.go index 5b436b6..deb15a0 100644 --- a/log.go +++ b/log.go @@ -22,19 +22,23 @@ In your package, register NETWARN: */ func Log(f *LogFlag, a ...any) { - if ! f.Ok() { + if !f.Ok() { // if the flag is NULL, notify the user they didn't initialize the flag a = append([]any{"FLAG = NULL"}, a...) realPrintln(a...) return } - if ! f.Get() { return } + if !f.Get() { + return + } a = append([]any{f.short}, a...) realPrintln(a...) } func Logf(f *LogFlag, s string, a ...any) { - if ! f.Get() { return } + if !f.Get() { + return + } s = f.short + " " + s realPrintf(s, a...) } -- cgit v1.2.3