From d04767a0ff417af97034e01b1b5a7b577739c980 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Mon, 8 Jan 2024 23:54:02 -0600 Subject: [PATCH] go.wit.com/log change Signed-off-by: Jeff Carr --- args.go | 32 ++++++++++++++++---------------- gui.go | 1 + linuxstatus/args.go | 36 ++++++++++++++++++------------------ smartwindow/args.go | 16 ++++++++-------- 4 files changed, 43 insertions(+), 42 deletions(-) diff --git a/args.go b/args.go index b521e42..8e6bb4d 100644 --- a/args.go +++ b/args.go @@ -19,32 +19,32 @@ var args struct { VerboseDNS bool `arg:"--verbose-dns" help:"debug your dns settings"` } -var NOW log.LogFlag -var INFO log.LogFlag -var NET log.LogFlag -var DNS log.LogFlag +var NOW *log.LogFlag +var INFO *log.LogFlag +var NET *log.LogFlag +var DNS *log.LogFlag -var WARN log.LogFlag -var SPEW log.LogFlag +var WARN *log.LogFlag +var SPEW *log.LogFlag -var CHANGE log.LogFlag -var STATUS log.LogFlag +var CHANGE *log.LogFlag +var STATUS *log.LogFlag func init() { arg.MustParse(&args) full := "go.wit.com/control-panels/dns" short := "cpdns" - NOW.NewFlag( "NOW", true, full, short, "temp debugging stuff") - INFO.NewFlag("INFO", false, full, short, "normal debugging stuff") - NET.NewFlag( "NET", false, full, short, "Network logging") - DNS.NewFlag( "DNS", false, full, short, "dnsStatus.update()") + NOW = log.NewFlag( "NOW", true, full, short, "temp debugging stuff") + INFO = log.NewFlag("INFO", false, full, short, "normal debugging stuff") + NET = log.NewFlag( "NET", false, full, short, "Network logging") + DNS = log.NewFlag( "DNS", false, full, short, "dnsStatus.update()") - WARN.NewFlag("WARN", true, full, short, "bad things") - SPEW.NewFlag("SPEW", false, full, short, "spew stuff") + WARN = log.NewFlag("WARN", true, full, short, "bad things") + SPEW = log.NewFlag("SPEW", false, full, short, "spew stuff") - CHANGE.NewFlag("CHANGE", true, full, short, "when host or dns change") - STATUS.NewFlag("STATUS", false, full, short, "updateStatus() polling") + CHANGE = log.NewFlag("CHANGE", true, full, short, "when host or dns change") + STATUS = log.NewFlag("STATUS", false, full, short, "updateStatus() polling") if debugger.ArgDebug() { log.Log(NOW, "INIT() gui debug == true") diff --git a/gui.go b/gui.go index 135e1aa..ed4c018 100644 --- a/gui.go +++ b/gui.go @@ -106,6 +106,7 @@ func mainWindow(title string) { }) gr.NewButton("test smartwindow()", func () { + log.Jeff(INFO, "jcarr") if me.fixWindow == nil { me.fixWindow = smartwindow.New() me.fixWindow.SetParent(me.myGui) diff --git a/linuxstatus/args.go b/linuxstatus/args.go index bbc390a..70df889 100644 --- a/linuxstatus/args.go +++ b/linuxstatus/args.go @@ -8,31 +8,31 @@ import ( "go.wit.com/log" ) -var NOW log.LogFlag -var INFO log.LogFlag -var NET log.LogFlag -var DNS log.LogFlag +var NOW *log.LogFlag +var INFO *log.LogFlag +var NET *log.LogFlag +var DNS *log.LogFlag -var PROC log.LogFlag -var SPEW log.LogFlag -var WARN log.LogFlag +var PROC *log.LogFlag +var SPEW *log.LogFlag +var WARN *log.LogFlag -var CHANGE log.LogFlag -var STATUS log.LogFlag +var CHANGE *log.LogFlag +var STATUS *log.LogFlag func init() { full := "go.wit.com/control-panels/dns/linuxstatus" short := "linux" - NOW.NewFlag( "NOW", true, full, short, "temp debugging stuff") - INFO.NewFlag("INFO", false, full, short, "normal debugging stuff") - NET.NewFlag( "NET", false, full, short, "Network logging") - DNS.NewFlag( "DNS", false, full, short, "dnsStatus.update()") + NOW = log.NewFlag( "NOW", true, full, short, "temp debugging stuff") + INFO = log.NewFlag("INFO", false, full, short, "normal debugging stuff") + NET = log.NewFlag( "NET", false, full, short, "Network logging") + DNS = log.NewFlag( "DNS", false, full, short, "dnsStatus.update()") - PROC.NewFlag("PROC", false, full, short, "/proc loggging") - WARN.NewFlag("WARN", true, full, short, "bad things") - SPEW.NewFlag("SPEW", false, full, short, "spew stuff") + PROC = log.NewFlag("PROC", false, full, short, "/proc loggging") + WARN = log.NewFlag("WARN", true, full, short, "bad things") + SPEW = log.NewFlag("SPEW", false, full, short, "spew stuff") - CHANGE.NewFlag("CHANGE", true, full, short, "when host or dns change") - STATUS.NewFlag("STATUS", false, full, short, "Update() details") + CHANGE = log.NewFlag("CHANGE", true, full, short, "when host or dns change") + STATUS = log.NewFlag("STATUS", false, full, short, "Update() details") } diff --git a/smartwindow/args.go b/smartwindow/args.go index 71bf505..8722b69 100644 --- a/smartwindow/args.go +++ b/smartwindow/args.go @@ -8,17 +8,17 @@ import ( "go.wit.com/log" ) -var NOW log.LogFlag -var INFO log.LogFlag -var SPEW log.LogFlag -var WARN log.LogFlag +var NOW *log.LogFlag +var INFO *log.LogFlag +var SPEW *log.LogFlag +var WARN *log.LogFlag func init() { full := "go.wit.com/gui/gadgets/smartwindow" short := "smartWin" - NOW.NewFlag( "NOW", true, full, short, "temp debugging stuff") - INFO.NewFlag("INFO", false, full, short, "General Info") - SPEW.NewFlag("SPEW", false, full, short, "spew stuff") - WARN.NewFlag("WARN", false, full, short, "bad things") + NOW = log.NewFlag( "NOW", true, full, short, "temp debugging stuff") + INFO = log.NewFlag("INFO", false, full, short, "General Info") + SPEW = log.NewFlag("SPEW", false, full, short, "spew stuff") + WARN = log.NewFlag("WARN", false, full, short, "bad things") }