mirror of
https://github.com/distribution/distribution.git
synced 2025-07-05 19:48:27 +00:00
Merge pull request #1099 from RichardScothern/go-version
Add go version to logger output
This commit is contained in:
commit
6bcd8a1dec
@ -4,6 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
|
"runtime"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Logger provides a leveled-logging interface.
|
// Logger provides a leveled-logging interface.
|
||||||
@ -98,6 +99,7 @@ func getLogrusLogger(ctx Context, keys ...interface{}) *logrus.Entry {
|
|||||||
fields["instance.id"] = instanceID
|
fields["instance.id"] = instanceID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fields["go.version"] = runtime.Version()
|
||||||
// If no logger is found, just return the standard logger.
|
// If no logger is found, just return the standard logger.
|
||||||
logger = logrus.StandardLogger().WithFields(fields)
|
logger = logrus.StandardLogger().WithFields(fields)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user