summaryrefslogtreecommitdiff
path: root/flags.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-01 06:45:49 -0600
committerJeff Carr <[email protected]>2024-01-01 06:45:49 -0600
commit064ffdfab234d351c9f194a6a74a47168f31895f (patch)
treee2a7822c4d838bc354ee4f9d54e5840346f895a2 /flags.go
parentb780c1a929f3788fd783346b5206bec7f0bb1d69 (diff)
more on flags
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'flags.go')
-rw-r--r--flags.go6
1 files changed, 6 insertions, 0 deletions
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)