Skip to content

Commit

Permalink
Add debug log to robot property update
Browse files Browse the repository at this point in the history
  • Loading branch information
oysand committed Dec 21, 2023
1 parent 5728771 commit b3285d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/api/Services/RobotService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,11 @@ private async Task<Robot> UpdateRobotProperty(string robotId, string propertyNam

foreach (var property in typeof(Robot).GetProperties())
{
if (property.Name == propertyName) { property.SetValue(robot, value); }
if (property.Name == propertyName)
{
logger.LogDebug("Setting {robotName} field {propertyName} from {oldValue} to {NewValue}", robot.Name, propertyName, property.GetValue(robot), value);
property.SetValue(robot, value);
}
}

robot = await Update(robot);
Expand Down

0 comments on commit b3285d1

Please sign in to comment.