Correctly log application version

Signed-off-by: Stephen J Day <stephen.day@docker.com>
pull/366/head
Stephen J Day 2015-04-15 16:37:39 -07:00
parent 75919b7dcc
commit 600de20037
1 changed files with 2 additions and 1 deletions

View File

@ -47,6 +47,7 @@ func main() {
}
ctx := context.Background()
ctx = context.WithValue(ctx, "version", version.Version)
config, err := resolveConfiguration()
if err != nil {
@ -226,7 +227,7 @@ func configureLogging(ctx context.Context, config *configuration.Configuration)
}
// 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 {
// build up the static fields, if present.