github.com/creativeprojects/go-selfupdate@v1.2.0/log_test.go (about)

     1  package selfupdate
     2  
     3  import (
     4  	stdlog "log"
     5  	"os"
     6  )
     7  
     8  func ExampleSetLogger() {
     9  	// you can plug-in any logger providing the 2 methods Print and Printf
    10  	// the default log.Logger satisfies the interface
    11  	logger := stdlog.New(os.Stdout, "selfupdate ", 0)
    12  	SetLogger(logger)
    13  }