Skip to content

Commit

Permalink
Add go version to logger output
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Scothern <[email protected]>
  • Loading branch information
rscothern committed Oct 22, 2015
1 parent e5d9837 commit e569236
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions context/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"

"github.com/Sirupsen/logrus"
"runtime"
)

// Logger provides a leveled-logging interface.
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit e569236

Please sign in to comment.