mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
proxy: improve addr handling
This commit is contained in:
1 parent
e12642b47a
commit
7e7c7553cc
12 files changed
+99
-109
No files matched your search
+9
-7
@@ -5,17 +5,19 @@ import (
|
||||
stdlog "log"
|
||||
)
|
||||
|
||||
// F is the main log function.
|
||||
var F = func(string, ...any) {}
|
||||
var verbose = false
|
||||
|
||||
// SetFlags sets the output flags for the logger.
|
||||
func SetFlags(flag int) {
|
||||
// Set sets the logger's verbose mode and output flags.
|
||||
func Set(v bool, flag int) {
|
||||
verbose = v
|
||||
stdlog.SetFlags(flag)
|
||||
}
|
||||
|
||||
// Debugf prints debug log.
|
||||
func Debugf(f string, v ...any) {
|
||||
stdlog.Output(2, fmt.Sprintf(f, v...))
|
||||
// F prints debug log.
|
||||
func F(f string, v ...any) {
|
||||
if verbose {
|
||||
stdlog.Output(2, fmt.Sprintf(f, v...))
|
||||
}
|
||||
}
|
||||
|
||||
// Print prints log.
|
||||
|
||||
Reference in new issue
Block a user