chore: optimize dhcpd and dns and more

This commit is contained in:
nadoo committed 2022-01-29 21:10:09 +08:00
1 parent 7e7c7553cc
commit f2eb638b91
9 files changed
+56 -54

No files matched your search

+4 -4
View File
@@ -5,17 +5,17 @@ import (
stdlog "log"
)
var verbose = false
var enable = false
// Set sets the logger's verbose mode and output flags.
func Set(v bool, flag int) {
verbose = v
func Set(verbose bool, flag int) {
enable = verbose
stdlog.SetFlags(flag)
}
// F prints debug log.
func F(f string, v ...any) {
if verbose {
if enable {
stdlog.Output(2, fmt.Sprintf(f, v...))
}
}