From 12b1b9a3d687ad3c97c91ff85638421c90ccea39 Mon Sep 17 00:00:00 2001 From: Anton Evangelatov Date: Thu, 26 Apr 2018 17:40:43 +0200 Subject: [PATCH 1/2] cmd/swarm: log error on upload --- cmd/swarm/swarm-smoke/upload_and_sync.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/swarm/swarm-smoke/upload_and_sync.go b/cmd/swarm/swarm-smoke/upload_and_sync.go index 70c33d1465..48d182c7f4 100644 --- a/cmd/swarm/swarm-smoke/upload_and_sync.go +++ b/cmd/swarm/swarm-smoke/upload_and_sync.go @@ -42,11 +42,13 @@ func cliUploadAndSync(c *cli.Context) error { hash, err := upload(f, endpoints[0]) if err != nil { + log.Error(err.Error()) return err } fhash, err := digest(f) if err != nil { + log.Error(err.Error()) return err } From 7612c14459def6ea7d0d8e30fc45698e29b74b43 Mon Sep 17 00:00:00 2001 From: Anton Evangelatov Date: Thu, 26 Apr 2018 17:56:10 +0200 Subject: [PATCH 2/2] swarm/api: increase verbosity of logs --- swarm/api/api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/swarm/api/api.go b/swarm/api/api.go index 84ac95769b..e7df353b8d 100644 --- a/swarm/api/api.go +++ b/swarm/api/api.go @@ -319,9 +319,9 @@ func (self *Api) Get(key storage.Key, path string) (reader *storage.LazyChunkRea return } - log.Trace("trie getting entry", "key", key, "path", path) + log.Debug("trie getting entry", "key", key, "path", path) entry, _ := trie.getEntry(path) - log.Trace("trie got entry", "key", key, "path", path) + log.Debug("trie got entry", "key", key, "path", path, "entry.Hash", entry.Hash) if entry != nil { // we want to be able to serve Mutable Resource Updates transparently using the bzz:// scheme @@ -343,7 +343,7 @@ func (self *Api) Get(key storage.Key, path string) (reader *storage.LazyChunkRea return } else { mimeType = entry.ContentType - log.Trace("content lookup key", "key", key, "mimetype", mimeType) + log.Debug("content lookup key", "key", key, "mimetype", mimeType) reader, _ = self.dpa.Retrieve(key) } } else {