log.go 188 B

12345678910111213141516
  1. package internal
  2. import (
  3. "fmt"
  4. "log"
  5. )
  6. var Logger *log.Logger
  7. func Logf(s string, args ...interface{}) {
  8. if Logger == nil {
  9. return
  10. }
  11. Logger.Output(2, fmt.Sprintf(s, args...))
  12. }