From 0ad3d71f01007b131f2a920a5e34ef946bf92a0d Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 27 Jun 2015 15:47:29 +0200 Subject: [PATCH] repository: Add more debug to Create() --- repository/repository.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/repository/repository.go b/repository/repository.go index aad5f3c9b..491ef6bd7 100644 --- a/repository/repository.go +++ b/repository/repository.go @@ -372,7 +372,7 @@ func (s *Repository) SaveJSONUnpacked(t backend.Type, item interface{}) (backend if err != nil { return nil, err } - debug.Log("Repo.SaveJSONUnpacked", "create new file %p", blob) + debug.Log("Repo.SaveJSONUnpacked", "create new blob %v", t) // hash hw := backend.NewHashingWriter(blob, sha256.New()) @@ -396,9 +396,12 @@ func (s *Repository) SaveJSONUnpacked(t backend.Type, item interface{}) (backend err = blob.Finalize(t, sid.String()) if err != nil { + debug.Log("Repo.SaveJSONUnpacked", "error saving blob %v as %v: %v", t, sid, err) return nil, err } + debug.Log("Repo.SaveJSONUnpacked", "new blob %v saved as %v", t, sid) + return sid, nil }