mirror of
https://github.com/minio/minio.git
synced 2025-11-20 18:06:10 -05:00
Add node address information to logs (#7941)
This commit is contained in:
committed by
Harshavardhana
parent
be9baa1464
commit
fbfc9a61ec
@@ -31,7 +31,6 @@ import (
|
||||
"github.com/minio/minio/cmd/logger"
|
||||
"github.com/minio/minio/pkg/auth"
|
||||
"github.com/minio/minio/pkg/handlers"
|
||||
xnet "github.com/minio/minio/pkg/net"
|
||||
)
|
||||
|
||||
// Parses location constraint from the incoming reader.
|
||||
@@ -387,15 +386,11 @@ func notFoundHandler(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// gets host name for current node
|
||||
func getHostName(r *http.Request) (hostName string, err error) {
|
||||
var thisAddr *xnet.Host
|
||||
hostName = r.Host
|
||||
func getHostName(r *http.Request) (hostName string) {
|
||||
if globalIsDistXL {
|
||||
thisAddr, err = xnet.ParseHost(GetLocalPeer(globalEndpoints))
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
hostName = thisAddr.String()
|
||||
hostName = GetLocalPeer(globalEndpoints)
|
||||
} else {
|
||||
hostName = r.Host
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user