mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-07 01:26:43 +00:00
![Riley Karson](/assets/img/avatar_default.png)
We aren't ready to release a `0.12` SDK based build because of these issues: • https://github.com/hashicorp/terraform/issues/20505 • https://github.com/hashicorp/terraform/issues/20507 • https://github.com/hashicorp/terraform/issues/20506 • https://github.com/hashicorp/terraform/issues/20504
24 lines
569 B
Go
24 lines
569 B
Go
package complete
|
|
|
|
import (
|
|
"io"
|
|
"io/ioutil"
|
|
"log"
|
|
"os"
|
|
)
|
|
|
|
// Log is used for debugging purposes
|
|
// since complete is running on tab completion, it is nice to
|
|
// have logs to the stderr (when writing your own completer)
|
|
// to write logs, set the COMP_DEBUG environment variable and
|
|
// use complete.Log in the complete program
|
|
var Log = getLogger()
|
|
|
|
func getLogger() func(format string, args ...interface{}) {
|
|
var logfile io.Writer = ioutil.Discard
|
|
if os.Getenv(envDebug) != "" {
|
|
logfile = os.Stderr
|
|
}
|
|
return log.New(logfile, "complete ", log.Flags()).Printf
|
|
}
|