github.com/v2pro/plz@v0.0.0-20221028024117-e5f9aec5b631/countlog/loglog/loglog.go (about)

     1  // logger for logger
     2  package loglog
     3  
     4  import (
     5  	"os"
     6  	"fmt"
     7  )
     8  
     9  // Error reports error encountered in the logger itself
    10  var Error = func(err error) {
    11  	fmt.Fprintf(os.Stderr, "countlog encountered error: %v\n", err)
    12  	os.Stderr.Sync()
    13  }
    14  
    15  // Message can be set like this loglog.Message = fmt.Println
    16  var Message = func(a ...interface{}) (n int, err error) {
    17  	return 0, nil
    18  }