control-panel-dns/flags.go

44 lines
1.2 KiB
Go
Raw Normal View History

2023-02-08 11:04:04 -06:00
package main
import (
"time"
"go.wit.com/log"
2023-02-08 11:04:04 -06:00
)
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 CHANGE *log.LogFlag
var STATUS *log.LogFlag
func init() {
full := "go.wit.com/control-panels/dns"
short := "cpdns"
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 = log.NewFlag("WARN", true, full, short, "bad things")
SPEW = log.NewFlag("SPEW", false, full, short, "spew stuff")
CHANGE = log.NewFlag("CHANGE", true, full, short, "when host or dns change")
STATUS = log.NewFlag("STATUS", false, full, short, "updateStatus() polling")
me.dnsSleep = 500 * time.Millisecond
me.localSleep = 100 * time.Millisecond
me.artificialSleep = 0.4 // seems to need to exist or GTK crashes. TODO: fix andlabs plugin
me.artificialS = "blah"
log.Log(INFO, "init() me.artificialSleep =", me.artificialSleep)
log.Log(INFO, "init() me.artificialS =", me.artificialS)
log.Sleep(me.artificialSleep)
}