From 47749fa1dfb6c4c1718ced4aedd1a53f3e72f954 Mon Sep 17 00:00:00 2001 From: Bryan <52000861+onizmx@users.noreply.github.com> Date: Mon, 10 Jun 2024 15:32:51 +1200 Subject: [PATCH] gs: Add logs (#213) * gs: Add logs * gs: F linter --- pkg/gatewayserver/io/io.go | 1 + pkg/gatewayserver/scheduling/scheduler.go | 4 ++++ .../console/containers/deployment-component-status/index.js | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/gatewayserver/io/io.go b/pkg/gatewayserver/io/io.go index 9b6e0b3866..ed581ff152 100644 --- a/pkg/gatewayserver/io/io.go +++ b/pkg/gatewayserver/io/io.go @@ -674,6 +674,7 @@ func (c *Connection) ScheduleDown(path *ttnpb.DownlinkPath, msg *ttnpb.DownlinkM RTTs: c.rtts, Priority: request.Priority, UplinkToken: uplinkToken, // uplinkToken is always present with class A downlink, but may be nil otherwise. + GatewayID: c.gateway.Ids.GatewayId, }) if err != nil { logger.WithError(err).Debug("Failed to schedule downlink in Rx window") diff --git a/pkg/gatewayserver/scheduling/scheduler.go b/pkg/gatewayserver/scheduling/scheduler.go index 54accf6a65..fe4541744f 100644 --- a/pkg/gatewayserver/scheduling/scheduler.go +++ b/pkg/gatewayserver/scheduling/scheduler.go @@ -284,6 +284,7 @@ type Options struct { RTTs RTTs Priority ttnpb.TxSchedulePriority UplinkToken *ttnpb.UplinkToken + GatewayID string } // ScheduleAt attempts to schedule the given Tx settings with the given priority. @@ -323,6 +324,9 @@ func (s *Scheduler) ScheduleAt(ctx context.Context, opts Options) (res Emission, if !ok { // Bryan: we can simply fail here to block all Class B and C transmission // when gateway gps time is nil in clock.go. + log.FromContext(ctx).WithFields(log.Fields( + "id", opts.GatewayID, + )).Info("Bryan here is the failed one") return Emission{}, 0, errNoAbsoluteGatewayTime.New() } } else { diff --git a/pkg/webui/console/containers/deployment-component-status/index.js b/pkg/webui/console/containers/deployment-component-status/index.js index 2035ac1537..8b110f0b26 100644 --- a/pkg/webui/console/containers/deployment-component-status/index.js +++ b/pkg/webui/console/containers/deployment-component-status/index.js @@ -59,7 +59,7 @@ const DeploymentComponentStatus = () => ( - TTS v{process.env.VERSION} + TTS v{process.env.VERSION} GPS Time Fix
{process.env.REVISION}