2024-01-06 05:24:11 -06:00
|
|
|
package linuxstatus
|
|
|
|
|
|
|
|
/*
|
|
|
|
this enables command line options from other packages like 'gui' and 'log'
|
|
|
|
*/
|
|
|
|
|
|
|
|
import (
|
|
|
|
"go.wit.com/log"
|
|
|
|
)
|
|
|
|
|
|
|
|
var NOW log.LogFlag
|
2024-01-06 11:12:10 -06:00
|
|
|
var INFO log.LogFlag
|
2024-01-06 05:24:11 -06:00
|
|
|
var NET log.LogFlag
|
|
|
|
var DNS log.LogFlag
|
|
|
|
var PROC log.LogFlag
|
|
|
|
var SPEW log.LogFlag
|
2024-01-06 11:12:10 -06:00
|
|
|
var WARN log.LogFlag
|
2024-01-06 05:24:11 -06:00
|
|
|
var CHANGE log.LogFlag
|
|
|
|
var STATUS log.LogFlag
|
|
|
|
|
2024-01-06 11:12:10 -06:00
|
|
|
func myreg(f *log.LogFlag, b bool, name string, desc string) {
|
|
|
|
f.B = b
|
|
|
|
f.Subsystem = "go.wit.com/control-panels/dns/linuxstatus"
|
|
|
|
f.Short = "linux"
|
|
|
|
f.Desc = desc
|
|
|
|
f.Name = name
|
|
|
|
f.Register()
|
|
|
|
}
|
2024-01-06 05:24:11 -06:00
|
|
|
|
2024-01-06 11:12:10 -06:00
|
|
|
func init() {
|
|
|
|
myreg(&NOW, true, "NOW", "temp debugging stuff")
|
2024-01-06 21:02:41 -06:00
|
|
|
myreg(&INFO, false, "INFO", "normal debugging stuff")
|
2024-01-06 11:12:10 -06:00
|
|
|
myreg(&NET, false, "NET", "Network Logging")
|
|
|
|
myreg(&DNS, false, "DNS", "dnsStatus.update()")
|
|
|
|
myreg(&PROC, false, "PROC", "/proc logging")
|
|
|
|
myreg(&SPEW, false, "SPEW", "spew stuff")
|
|
|
|
myreg(&WARN, true, "WARN", "bad things")
|
|
|
|
myreg(&CHANGE, true, "CHANGE", "show droplet state changes")
|
|
|
|
myreg(&STATUS, false, "STATUS", "Update() details")
|
2024-01-06 05:24:11 -06:00
|
|
|
}
|