diff --git a/src/DataStreamSuite/PubSub/Client/Routing/PubSubRouter.cs b/src/DataStreamSuite/PubSub/Client/Routing/PubSubRouter.cs index f6d69702f..339b320dc 100644 --- a/src/DataStreamSuite/PubSub/Client/Routing/PubSubRouter.cs +++ b/src/DataStreamSuite/PubSub/Client/Routing/PubSubRouter.cs @@ -10,6 +10,7 @@ using Microsoft.Extensions.Options; using System; using System.Collections.Generic; using System.Linq; +using System.Text.Json; namespace BCG { public class PubSubRouter : IPubSubRouter { @@ -30,10 +31,10 @@ namespace BCG { public PubSubRouter(PubSubRoute[] sub_routes, PubSubRoute[] pub_routes) { string log_msg = String.Empty; foreach (var route in sub_routes) { - log_msg += $" sub_route: {route}"; + log_msg += $" sub_route: {JsonSerializer.Serialize(route)}"; } foreach (var route in pub_routes) { - log_msg += $" pub_route: {route}"; + log_msg += $" pub_route: {JsonSerializer.Serialize(route)}"; } Log.Gen.info($"PubSubRouter routes: {log_msg}"); _sub_routes = sub_routes; @@ -50,7 +51,7 @@ namespace BCG { if (!_pub_routes.TryGetFirst(r => r?.IsMatch(tag) ?? false, out var route)) { throw new ArgumentException($"Failed to find route for tag '{tag}'", nameof(tag)); } - Log.Gen.info($"PubSubRouter.get_sub_url_for_tag tag: {tag} route: {route}"); + Log.Gen.info($"PubSubRouter.get_sub_url_for_tag tag: {tag} route: {JsonSerializer.Serialize(route)}"); ArgumentNullException.ThrowIfNull(route.ServerAddress); return RemoteConnectionInfo.parse_url(route.ServerAddress); } @@ -59,7 +60,7 @@ namespace BCG { if (!_sub_routes.TryGetFirst(r => r?.IsMatch(tag) ?? false, out var route)) { throw new ArgumentException($"Failed to find route for tag '{tag}'", nameof(tag)); } - Log.Gen.info($"PubSubRouter.get_sub_url_for_tag tag: {tag} route: {route}"); + Log.Gen.info($"PubSubRouter.get_sub_url_for_tag tag: {tag} route: {JsonSerializer.Serialize(route)}"); ArgumentNullException.ThrowIfNull(route.ServerAddress); return RemoteConnectionInfo.parse_url(route.ServerAddress); }