From e569236f1e4f927f31c5ff622163430a32ffcb15 Mon Sep 17 00:00:00 2001 From: Richard Scothern Date: Mon, 5 Oct 2015 15:28:22 -0700 Subject: [PATCH] Add go version to logger output Signed-off-by: Richard Scothern --- context/logger.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/context/logger.go b/context/logger.go index 7c5e5187..fbb6a051 100644 --- a/context/logger.go +++ b/context/logger.go @@ -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) }