Adds logging for parking zone code
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s
Adds logging of the parking zone code when parking starts in a determined zone. This provides more detailed information for debugging and monitoring purposes.
This commit is contained in:
@@ -108,18 +108,21 @@ public class MessageProcessor
|
|||||||
this.logger.LogInformation("Parking started in non-parking zone for {VIN}", vin);
|
this.logger.LogInformation("Parking started in non-parking zone for {VIN}", vin);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Push parking started in zone
|
else
|
||||||
this.parkingState.SetParkingStarted();
|
{
|
||||||
if (sendNotification)
|
// Push parking started in zone
|
||||||
this.pushApi.Send(pushoverToken, new PushoverMessage
|
this.parkingState.SetParkingStarted();
|
||||||
{
|
if (sendNotification)
|
||||||
Title = $"Parkolás elindult: {zoneLookupResult.Value}",
|
this.pushApi.Send(pushoverToken, new PushoverMessage
|
||||||
Message = $"Megálltál egy parkolási zónában, a GPS szerint: {this.teslaState.Latitude},{this.teslaState.Longitude}" + Environment.NewLine +
|
{
|
||||||
$"A zónatérkép szerint ez a {zoneLookupResult.Value} jelű zóna",
|
Title = $"Parkolás elindult: {zoneLookupResult.Value}",
|
||||||
Priority = Priority.Normal,
|
Message = $"Megálltál egy parkolási zónában, a GPS szerint: {this.teslaState.Latitude},{this.teslaState.Longitude}" + Environment.NewLine +
|
||||||
Timestamp = DateTimeOffset.Now.ToLocalTime().ToString(),
|
$"A zónatérkép szerint ez a {zoneLookupResult.Value} jelű zóna",
|
||||||
});
|
Priority = Priority.Normal,
|
||||||
this.logger.LogInformation("Parking started for {VIN}", vin);
|
Timestamp = DateTimeOffset.Now.ToLocalTime().ToString(),
|
||||||
|
});
|
||||||
|
this.logger.LogInformation("Parking started for {VIN} at {ZoneCode}", vin, zoneLookupResult.Value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
this.logger.LogError(zoneLookupResult.Exception, "Can't start parking: error while determining parking zone");
|
this.logger.LogError(zoneLookupResult.Exception, "Can't start parking: error while determining parking zone");
|
||||||
|
|||||||
Reference in New Issue
Block a user