From 7ce7e5815e84c3f5cd28367d9ed442c547aa08e2 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Mon, 20 Jul 2015 09:40:18 -0700 Subject: [PATCH] fixing 'writing data' log message Signed-off-by: David Lawrence (github: endophage) --- server/handlers/default.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/handlers/default.go b/server/handlers/default.go index 0452d7b198..3372e21522 100644 --- a/server/handlers/default.go +++ b/server/handlers/default.go @@ -150,7 +150,7 @@ func GetTimestampHandler(ctx context.Context, w http.ResponseWriter, r *http.Req } } - logrus.Debug("Writing data") + logrus.Debugf("[Notary Server] 200 GET timestamp: %s", gun) w.Write(out) return nil } @@ -161,11 +161,13 @@ func GetTimestampKeyHandler(ctx context.Context, w http.ResponseWriter, r *http. s := ctx.Value("metaStore") store, ok := s.(storage.MetaStore) if !ok { + logrus.Debugf("[Notary Server] 500 GET storage not configured") return errors.ErrNoStorage.WithDetail(nil) } c := ctx.Value("cryptoService") crypto, ok := c.(signed.CryptoService) if !ok { + logrus.Debugf("[Notary Server] 500 GET crypto service not configured") return errors.ErrNoCryptoService.WithDetail(nil) } @@ -174,13 +176,16 @@ func GetTimestampKeyHandler(ctx context.Context, w http.ResponseWriter, r *http. key, err := timestamp.GetOrCreateTimestampKey(gun, store, crypto, data.ED25519Key) if err != nil { + logrus.Debugf("[Notary Server] 500 GET timestamp key: %s", gun) return errors.ErrUnknown.WithDetail(err) } out, err := json.Marshal(key) if err != nil { + logrus.Debugf("[Notary Server] 500 GET timestamp key: %s", gun) return errors.ErrUnknown.WithDetail(err) } + logrus.Debugf("[Notary Server] 200 GET timestamp key: %s", gun) w.Write(out) return nil }