mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
chore: move some packages to pkg folder
This commit is contained in:
1 parent
a529261893
commit
1fd59a1677
82 files changed
+133
-123
No files matched your search
@@ -0,0 +1,39 @@
|
||||
package log
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
stdlog "log"
|
||||
)
|
||||
|
||||
// F is the main log function.
|
||||
var F = func(string, ...interface{}) {}
|
||||
|
||||
// SetFlags sets the output flags for the logger.
|
||||
func SetFlags(flag int) {
|
||||
stdlog.SetFlags(flag)
|
||||
}
|
||||
|
||||
// Debugf prints debug log.
|
||||
func Debugf(f string, v ...interface{}) {
|
||||
stdlog.Output(2, fmt.Sprintf(f, v...))
|
||||
}
|
||||
|
||||
// Print prints log.
|
||||
func Print(v ...interface{}) {
|
||||
stdlog.Print(v...)
|
||||
}
|
||||
|
||||
// Printf prints log.
|
||||
func Printf(f string, v ...interface{}) {
|
||||
stdlog.Printf(f, 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