mirror of
https://github.com/distribution/distribution.git
synced 2025-09-02 15:36:10 +00:00
Merge pull request #366 from stevvooe/log-version
cmd/registry: correctly log application version
This commit is contained in:
@@ -47,6 +47,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
ctx = context.WithValue(ctx, "version", version.Version)
|
||||||
|
|
||||||
config, err := resolveConfiguration()
|
config, err := resolveConfiguration()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -226,7 +227,7 @@ func configureLogging(ctx context.Context, config *configuration.Configuration)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// log the application version with messages
|
// log the application version with messages
|
||||||
ctx = context.WithValue(ctx, "version", version.Version)
|
ctx = context.WithLogger(ctx, context.GetLogger(ctx, "version"))
|
||||||
|
|
||||||
if len(config.Log.Fields) > 0 {
|
if len(config.Log.Fields) > 0 {
|
||||||
// build up the static fields, if present.
|
// build up the static fields, if present.
|
||||||
|
Reference in New Issue
Block a user