mirror of https://github.com/docker/docs.git
fixing 'writing data' log message
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
This commit is contained in:
parent
7c05c0e334
commit
7ce7e5815e
|
|
@ -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)
|
w.Write(out)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
@ -161,11 +161,13 @@ func GetTimestampKeyHandler(ctx context.Context, w http.ResponseWriter, r *http.
|
||||||
s := ctx.Value("metaStore")
|
s := ctx.Value("metaStore")
|
||||||
store, ok := s.(storage.MetaStore)
|
store, ok := s.(storage.MetaStore)
|
||||||
if !ok {
|
if !ok {
|
||||||
|
logrus.Debugf("[Notary Server] 500 GET storage not configured")
|
||||||
return errors.ErrNoStorage.WithDetail(nil)
|
return errors.ErrNoStorage.WithDetail(nil)
|
||||||
}
|
}
|
||||||
c := ctx.Value("cryptoService")
|
c := ctx.Value("cryptoService")
|
||||||
crypto, ok := c.(signed.CryptoService)
|
crypto, ok := c.(signed.CryptoService)
|
||||||
if !ok {
|
if !ok {
|
||||||
|
logrus.Debugf("[Notary Server] 500 GET crypto service not configured")
|
||||||
return errors.ErrNoCryptoService.WithDetail(nil)
|
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)
|
key, err := timestamp.GetOrCreateTimestampKey(gun, store, crypto, data.ED25519Key)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
logrus.Debugf("[Notary Server] 500 GET timestamp key: %s", gun)
|
||||||
return errors.ErrUnknown.WithDetail(err)
|
return errors.ErrUnknown.WithDetail(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
out, err := json.Marshal(key)
|
out, err := json.Marshal(key)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
logrus.Debugf("[Notary Server] 500 GET timestamp key: %s", gun)
|
||||||
return errors.ErrUnknown.WithDetail(err)
|
return errors.ErrUnknown.WithDetail(err)
|
||||||
}
|
}
|
||||||
|
logrus.Debugf("[Notary Server] 200 GET timestamp key: %s", gun)
|
||||||
w.Write(out)
|
w.Write(out)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue