log flags gui is kinda working now

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-01-20 14:57:53 -06:00
parent fce5068f04
commit 7371f0428f
1 changed files with 10 additions and 8 deletions

View File

@ -133,6 +133,13 @@ func ProcessFlags(callback func(*LogFlag)) {
}
// probably a better name than Get()
// switch to this
func (f *LogFlag) Bool() bool {
if ! f.Ok() {return false}
return f.b
}
// returns the value of the flag
func (f *LogFlag) Get() bool {
if ! f.Ok() {return false}
@ -146,13 +153,6 @@ func (f *LogFlag) Set(b bool) {
}
*/
// probably a better name than Get()
// switch to this
func (f *LogFlag) Bool() bool {
if ! f.Ok() {return false}
return f.b
}
// returns the name of the flag
func (f *LogFlag) GetName() string {
if ! f.Ok() {return ""}
@ -197,10 +197,12 @@ func NewFlag(name string, b bool, full, short, desc string) *LogFlag {
return f
}
func (f *LogFlag) Set(b bool) {
func (f *LogFlag) SetBool(b bool) {
/*
if ! f.Ok() {return}
flagsMutex.Lock()
defer flagsMutex.Unlock()
*/
Info("Set() ", "(" + f.subsystem + ")", f.name, "=", f.b, ":", f.desc)
f.b = b
Info("Set() f.b is now", f.b)