mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 17:35:40 +08:00
log: add LogFunc so we can define a custom logger
This commit is contained in:
parent
cba2f36b08
commit
65f33beaa3
16
log.go
Normal file
16
log.go
Normal file
@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
import "log"
|
||||
|
||||
// LogFunc .
|
||||
type LogFunc func(f string, v ...interface{})
|
||||
|
||||
var logf LogFunc
|
||||
|
||||
func init() {
|
||||
logf = func(f string, v ...interface{}) {
|
||||
if conf.Verbose {
|
||||
log.Printf(f, v...)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user