Only enable uuid generation warning when using registry handlers
Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
parent
c737d19235
commit
2c9ab4f441
3 changed files with 6 additions and 9 deletions
|
@ -29,6 +29,7 @@ import (
|
|||
_ "github.com/docker/distribution/registry/storage/driver/middleware/cloudfront"
|
||||
_ "github.com/docker/distribution/registry/storage/driver/s3"
|
||||
_ "github.com/docker/distribution/registry/storage/driver/swift"
|
||||
"github.com/docker/distribution/uuid"
|
||||
"github.com/docker/distribution/version"
|
||||
gorhandlers "github.com/gorilla/handlers"
|
||||
"github.com/yvasiyarov/gorelic"
|
||||
|
@ -62,6 +63,10 @@ func main() {
|
|||
fatalf("error configuring logger: %v", err)
|
||||
}
|
||||
|
||||
// inject a logger into the uuid library. warns us if there is a problem
|
||||
// with uuid generation under low entropy.
|
||||
uuid.Loggerf = context.GetLogger(ctx).Warnf
|
||||
|
||||
app := handlers.NewApp(ctx, *config)
|
||||
handler := configureReporting(app)
|
||||
handler = panicHandler(handler)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue