Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2017-05-09 19:20:42 +0300
committerJacob Vosmaer <jacob@gitlab.com>2017-05-10 17:53:13 +0300
commitf1424a9e6691c5ed7803bd65b50cf93d01e02f54 (patch)
treea13b20faf1083ca5b1e6ddd0dff6bb4b5f1b025c /internal/helper
parent0ac25b2e98b93285f09632ebca36218b368dd7cd (diff)
Log access and errors from interceptors
Diffstat (limited to 'internal/helper')
-rw-r--r--internal/helper/debug.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/internal/helper/debug.go b/internal/helper/debug.go
new file mode 100644
index 000000000..48116b2ba
--- /dev/null
+++ b/internal/helper/debug.go
@@ -0,0 +1,14 @@
+package helper
+
+import (
+ "log"
+ "os"
+)
+
+func Debugf(format string, args ...interface{}) {
+ if os.Getenv("GITALY_DEBUG") != "1" {
+ return
+ }
+
+ log.Printf("debug: "+format, args...)
+}