mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
chore: optimize dhcpd and dns and more
This commit is contained in:
1 parent
7e7c7553cc
commit
f2eb638b91
9 files changed
+56
-54
No files matched your search
+4
-4
@@ -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...))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user