[ARVADOS] updated: 07c92074fe2b493dc8cd0abdad154e5b36d4adfc

Git user git at public.curoverse.com
Mon Apr 3 16:21:36 EDT 2017


Summary of changes:
 sdk/go/keepclient/support.go | 10 ++++++++++
 1 file changed, 10 insertions(+)

       via  07c92074fe2b493dc8cd0abdad154e5b36d4adfc (commit)
       via  1654f776b55bbb861f72c0dd3118ad1beec5db31 (commit)
      from  55c34fb97edfba5a014eb43b965130cf11dbda8a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 07c92074fe2b493dc8cd0abdad154e5b36d4adfc
Merge: 55c34fb 1654f77
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon Apr 3 16:21:28 2017 -0400

    Merge branch '11407-go-sdk-debug' closes #11407


commit 1654f776b55bbb861f72c0dd3118ad1beec5db31
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon Apr 3 15:26:50 2017 -0400

    11407: keepclient checks for ARVADOS_DEBUG and enables debugging.

diff --git a/sdk/go/keepclient/support.go b/sdk/go/keepclient/support.go
index 2244779..9adbb48 100644
--- a/sdk/go/keepclient/support.go
+++ b/sdk/go/keepclient/support.go
@@ -7,9 +7,12 @@ import (
 	"git.curoverse.com/arvados.git/sdk/go/streamer"
 	"io"
 	"io/ioutil"
+	"log"
 	"math/rand"
 	"net"
 	"net/http"
+	"os"
+	"regexp"
 	"strings"
 	"time"
 )
@@ -19,6 +22,13 @@ import (
 // log.Printf to DebugPrintf.
 var DebugPrintf = func(string, ...interface{}) {}
 
+func init() {
+	var matchTrue = regexp.MustCompile("^(?i:1|yes|true)$")
+	if matchTrue.MatchString(os.Getenv("ARVADOS_DEBUG")) {
+		DebugPrintf = log.Printf
+	}
+}
+
 type keepService struct {
 	Uuid     string `json:"uuid"`
 	Hostname string `json:"service_host"`

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list