mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
general: restructure package, move socks to proxy
This commit is contained in:
1 parent
bd358e4ae6
commit
edfca215c5
47 files changed
+60
-60
No files matched your search
+35
@@ -0,0 +1,35 @@
|
||||
package log
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
stdlog "log"
|
||||
)
|
||||
|
||||
// F is the main log function.
|
||||
var F = func(string, ...interface{}) {}
|
||||
|
||||
// Debugf prints debug log.
|
||||
func Debugf(format string, v ...interface{}) {
|
||||
stdlog.SetFlags(stdlog.LstdFlags | stdlog.Lshortfile)
|
||||
stdlog.Output(2, fmt.Sprintf(format, v...))
|
||||
}
|
||||
|
||||
// Print prints log.
|
||||
func Print(v ...interface{}) {
|
||||
stdlog.Print(v...)
|
||||
}
|
||||
|
||||
// Printf prints log.
|
||||
func Printf(format string, v ...interface{}) {
|
||||
stdlog.Printf(format, v...)
|
||||
}
|
||||
|
||||
// Fatal log and exit.
|
||||
func Fatal(v ...interface{}) {
|
||||
stdlog.Fatal(v...)
|
||||
}
|
||||
|
||||
// Fatalf log and exit.
|
||||
func Fatalf(f string, v ...interface{}) {
|
||||
stdlog.Fatalf(f, v...)
|
||||
}
|
||||
Reference in new issue
Block a user