chore: add some logging for route queue processing

This commit is contained in:
Andrew Welker
2025-02-19 11:18:00 -06:00
parent 66cb592c70
commit a055d06bc6
2 changed files with 10 additions and 1 deletions

View File

@@ -38,5 +38,10 @@ namespace PepperDash.Essentials.Core
Debug.LogMessage(ex, "Exception handling cooldown", Destination);
}
}
public override string ToString()
{
return $"Route {Source?.Key ?? "No Source Device"}:{SourcePort?.Key ?? "auto"} to {Destination?.Key ?? "No Destination Device"}:{DestinationPort?.Key ?? "auto"}";
}
}
}

View File

@@ -1,5 +1,7 @@
using PepperDash.Essentials.Core.Queues;
using PepperDash.Core;
using PepperDash.Essentials.Core.Queues;
using System;
using Serilog.Events;
namespace PepperDash.Essentials.Core.Routing
{
@@ -16,6 +18,7 @@ namespace PepperDash.Essentials.Core.Routing
public void Dispatch()
{
Debug.LogMessage(LogEventLevel.Information, "Dispatching route request {routeRequest}", null, routeRequest);
action(routeRequest);
}
}
@@ -35,6 +38,7 @@ namespace PepperDash.Essentials.Core.Routing
public void Dispatch()
{
Debug.LogMessage(LogEventLevel.Information, "Dispatching release route request for {destination}:{inputPortKey}", null, destination?.Key ?? "no destination", string.IsNullOrEmpty(inputPortKey) ? "auto" : inputPortKey);
action(destination, inputPortKey);
}
}