1
0
mirror of https://github.com/docker/docs.git synced 2026-11-01 22:34:29 +03:00

Merge pull request #1099 from RichardScothern/go-version

Add go version to logger output
This commit is contained in:
Stephen Day
2015-10-27 14:19:43 -07:00

View File

@@ -4,6 +4,7 @@ import (
"fmt"
"github.com/Sirupsen/logrus"
"runtime"
)
// Logger provides a leveled-logging interface.
@@ -98,6 +99,7 @@ func getLogrusLogger(ctx Context, keys ...interface{}) *logrus.Entry {
fields["instance.id"] = instanceID
}
fields["go.version"] = runtime.Version()
// If no logger is found, just return the standard logger.
logger = logrus.StandardLogger().WithFields(fields)
}