From 064ffdfab234d351c9f194a6a74a47168f31895f Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Mon, 1 Jan 2024 06:45:49 -0600 Subject: [PATCH] more on flags Signed-off-by: Jeff Carr --- flags.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/flags.go b/flags.go index d8d886a..9155c6f 100644 --- a/flags.go +++ b/flags.go @@ -41,6 +41,11 @@ func All(b bool) { Set("WARN", b) Set("ERROR", b) Set("VERBOSE", b) + for _, f := range flags { + Warn("All() Setting Name =", f.Name, "Subsystem =", f.Subsystem, "to b =", b, "vs", f.B) + f.B = b + Warn("All() f.B is now", f.B) + } } func ListFlags() map[string][]string { @@ -88,6 +93,7 @@ func Get(flag string) bool { } // register a variable name from a subsystem +// inspired by Alex Flint func (f *LogFlag) Register() { Info("log.Register() ", f) flags = append(flags,f)