diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2017-05-09 19:20:42 +0300 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2017-05-10 17:53:13 +0300 |
commit | f1424a9e6691c5ed7803bd65b50cf93d01e02f54 (patch) | |
tree | a13b20faf1083ca5b1e6ddd0dff6bb4b5f1b025c /internal/helper | |
parent | 0ac25b2e98b93285f09632ebca36218b368dd7cd (diff) |
Log access and errors from interceptors
Diffstat (limited to 'internal/helper')
-rw-r--r-- | internal/helper/debug.go | 14 |
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...) +} |