Changed alias elekLogT to elekLogTypes

This commit is contained in:
balandi1 2019-11-21 13:05:52 -05:00
parent 20f2f1e8c5
commit 13c3de44be
10 changed files with 85 additions and 82 deletions

View file

@ -24,7 +24,7 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spdfg/elektron/constants"
"github.com/spdfg/elektron/elektronLogging"
elekLogT "github.com/spdfg/elektron/elektronLogging/types"
elekLogTypes "github.com/spdfg/elektron/elektronLogging/types"
"strings"
)
@ -90,13 +90,13 @@ func UpdateEnvironment(offer *mesos.Offer) {
var host = offer.GetHostname()
// If this host is not present in the set of hosts.
if _, ok := constants.Hosts[host]; !ok {
elektronLogging.ElektronLog.Log(elekLogT.GENERAL, log.InfoLevel,
elektronLogging.ElektronLog.Log(elekLogTypes.GENERAL, log.InfoLevel,
log.Fields{"Adding host": fmt.Sprintf("%s", host)}, "New host detected")
// Add this host.
constants.Hosts[host] = struct{}{}
// Get the power class of this host.
class := PowerClass(offer)
elektronLogging.ElektronLog.Log(elekLogT.GENERAL, log.InfoLevel,
elektronLogging.ElektronLog.Log(elekLogTypes.GENERAL, log.InfoLevel,
log.Fields{"host": fmt.Sprintf("%s", host), "PowerClass": fmt.Sprintf("%s", class)}, "Registering the power class...")
// If new power class, register the power class.
if _, ok := constants.PowerClasses[class]; !ok {