summaryrefslogtreecommitdiff
path: root/log.go
diff options
context:
space:
mode:
authorEyal Posener <[email protected]>2017-05-06 00:25:27 +0300
committerEyal Posener <[email protected]>2017-05-06 00:25:27 +0300
commit1af7c0b3b7bc0e4bf5605be7e02154a8876cba84 (patch)
treebb3220c9de676f16970ffb7c204aa3377194661f /log.go
parentc8263230e11aa755d3b0b964d4bf7ff296661f5e (diff)
Roughly add all go commands
Diffstat (limited to 'log.go')
-rw-r--r--log.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/log.go b/log.go
index 0b0a54a..797a80c 100644
--- a/log.go
+++ b/log.go
@@ -7,7 +7,12 @@ import (
"os"
)
-var logger = getLogger()
+// 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