diff --git a/pkg/sdkserver/localsdk.go b/pkg/sdkserver/localsdk.go index cf97eb64c7..818ea53c0e 100644 --- a/pkg/sdkserver/localsdk.go +++ b/pkg/sdkserver/localsdk.go @@ -110,13 +110,13 @@ func NewLocalSDKServer(filePath string) (*LocalSDKServer, error) { if event.Op != fsnotify.Write { continue } - logrus.WithField("event", event).Debug("File has been changed!") + logrus.WithField("event", event).Info("File has been changed!") err := l.setGameServerFromFilePath(filePath) if err != nil { logrus.WithError(err).Error("error setting GameServer from file") continue } - logrus.Debug("Sending watched GameServer!") + logrus.Info("Sending watched GameServer!") l.update <- struct{}{} } }() @@ -129,7 +129,7 @@ func NewLocalSDKServer(filePath string) (*LocalSDKServer, error) { go func() { for value := range l.update { - logrus.Debug("Gameserver update received") + logrus.Info("Gameserver update received") l.updateObservers.Range(func(observer, _ interface{}) bool { observer.(chan struct{}) <- value return true @@ -196,7 +196,7 @@ func (l *LocalSDKServer) updateState(newState agonesv1.GameServerState) { // Ready logs that the Ready request has been received func (l *LocalSDKServer) Ready(context.Context, *sdk.Empty) (*sdk.Empty, error) { - logrus.Debug("Ready request has been received!") + logrus.Info("Ready request has been received!") l.recordRequest("ready") l.gsMutex.Lock() defer l.gsMutex.Unlock() @@ -210,7 +210,7 @@ func (l *LocalSDKServer) Ready(context.Context, *sdk.Empty) (*sdk.Empty, error) // Allocate logs that an allocate request has been received func (l *LocalSDKServer) Allocate(context.Context, *sdk.Empty) (*sdk.Empty, error) { - logrus.Debug("Allocate request has been received!") + logrus.Info("Allocate request has been received!") l.recordRequest("allocate") l.gsMutex.Lock() defer l.gsMutex.Unlock() @@ -223,7 +223,7 @@ func (l *LocalSDKServer) Allocate(context.Context, *sdk.Empty) (*sdk.Empty, erro // Shutdown logs that the shutdown request has been received func (l *LocalSDKServer) Shutdown(context.Context, *sdk.Empty) (*sdk.Empty, error) { - logrus.Debug("Shutdown request has been received!") + logrus.Info("Shutdown request has been received!") l.recordRequest("shutdown") l.gsMutex.Lock() defer l.gsMutex.Unlock() @@ -238,20 +238,20 @@ func (l *LocalSDKServer) Health(stream sdk.SDK_HealthServer) error { for { _, err := stream.Recv() if err == io.EOF { - logrus.Debug("Health stream closed.") + logrus.Info("Health stream closed.") return stream.SendAndClose(&sdk.Empty{}) } if err != nil { return errors.Wrap(err, "Error with Health check") } l.recordRequest("health") - logrus.Debug("Health Ping Received!") + logrus.Info("Health Ping Received!") } } // SetLabel applies a Label to the backing GameServer metadata func (l *LocalSDKServer) SetLabel(_ context.Context, kv *sdk.KeyValue) (*sdk.Empty, error) { - logrus.WithField("values", kv).Debug("Setting label") + logrus.WithField("values", kv).Info("Setting label") l.gsMutex.Lock() defer l.gsMutex.Unlock() @@ -270,7 +270,7 @@ func (l *LocalSDKServer) SetLabel(_ context.Context, kv *sdk.KeyValue) (*sdk.Emp // SetAnnotation applies a Annotation to the backing GameServer metadata func (l *LocalSDKServer) SetAnnotation(_ context.Context, kv *sdk.KeyValue) (*sdk.Empty, error) { - logrus.WithField("values", kv).Debug("Setting annotation") + logrus.WithField("values", kv).Info("Setting annotation") l.gsMutex.Lock() defer l.gsMutex.Unlock() @@ -289,7 +289,7 @@ func (l *LocalSDKServer) SetAnnotation(_ context.Context, kv *sdk.KeyValue) (*sd // GetGameServer returns current GameServer configuration. func (l *LocalSDKServer) GetGameServer(context.Context, *sdk.Empty) (*sdk.GameServer, error) { - logrus.Debug("Getting GameServer details") + logrus.Info("Getting GameServer details") l.recordRequest("gameserver") l.gsMutex.RLock() defer l.gsMutex.RUnlock() @@ -298,7 +298,7 @@ func (l *LocalSDKServer) GetGameServer(context.Context, *sdk.Empty) (*sdk.GameSe // WatchGameServer will return current GameServer configuration, 3 times, every 5 seconds func (l *LocalSDKServer) WatchGameServer(_ *sdk.Empty, stream sdk.SDK_WatchGameServerServer) error { - logrus.Debug("Connected to watch GameServer...") + logrus.Info("Connected to watch GameServer...") observer := make(chan struct{}) defer func() { @@ -323,7 +323,7 @@ func (l *LocalSDKServer) WatchGameServer(_ *sdk.Empty, stream sdk.SDK_WatchGameS // Reserve moves this GameServer to the Reserved state for the Duration specified func (l *LocalSDKServer) Reserve(ctx context.Context, d *sdk.Duration) (*sdk.Empty, error) { - logrus.WithField("duration", d).Debug("Reserve request has been received!") + logrus.WithField("duration", d).Info("Reserve request has been received!") l.recordRequest("reserve") l.gsMutex.Lock() defer l.gsMutex.Unlock() @@ -426,18 +426,18 @@ func EqualSets(a, b []string) bool { // Close tears down all the things func (l *LocalSDKServer) compare() { - logrus.Debug("Compare") + logrus.Info("Compare") if l.testMode { if !EqualSets(l.expectedSequence, l.requestSequence) { - logrus.Debug(fmt.Sprintf("Testing Failed %v %v", l.expectedSequence, l.requestSequence)) + logrus.Info(fmt.Sprintf("Testing Failed %v %v", l.expectedSequence, l.requestSequence)) os.Exit(1) } } } func (l *LocalSDKServer) setGameServerFromFilePath(filePath string) error { - logrus.WithField("filePath", filePath).Debug("Reading GameServer configuration") + logrus.WithField("filePath", filePath).Info("Reading GameServer configuration") reader, err := os.Open(filePath) // nolint: gosec defer reader.Close() // nolint: megacheck,errcheck