mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 03:57:27 +00:00
fix: change how subscription state is logged to reduce traffic to console
This commit is contained in:
parent
2c49fb9321
commit
0c4ebdaf1d
2 changed files with 10 additions and 5 deletions
|
|
@ -194,7 +194,6 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
||||||
{
|
{
|
||||||
if (!enableMessengerSubscriptions)
|
if (!enableMessengerSubscriptions)
|
||||||
{
|
{
|
||||||
this.LogWarning("Messenger subscriptions not enabled");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -218,7 +217,6 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
||||||
{
|
{
|
||||||
if (!enableMessengerSubscriptions)
|
if (!enableMessengerSubscriptions)
|
||||||
{
|
{
|
||||||
this.LogWarning("Messenger subscriptions not enabled");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -238,7 +236,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.LogInformation("Client with ID {clientId} unsubscribed", clientId);
|
this.LogDebug("Client with ID {clientId} unsubscribed", clientId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -272,7 +270,8 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
this.LogError(ex, "Exception posting status message for {messagePath} to {clientId}", MessagePath, clientId ?? "all clients");
|
this.LogError("Exception posting status message for {messagePath} to {clientId}: {message}", MessagePath, clientId ?? "all clients", ex.Message);
|
||||||
|
this.LogDebug(ex, "Stack trace: ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -301,7 +300,8 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
this.LogError(ex, "Exception posting status message for {type} to {clientId}", type, clientId ?? "all clients");
|
this.LogError("Exception posting status message for {type} to {clientId}: {message}", type, clientId ?? "all clients", ex.Message);
|
||||||
|
this.LogDebug(ex, "Stack trace: ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1312,6 +1312,11 @@ namespace PepperDash.Essentials
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
|
if (!Config.EnableMessengerSubscriptions)
|
||||||
|
{
|
||||||
|
this.LogWarning("Messenger subscriptions disabled. add \"enableMessengerSubscriptions\": true to config for {key} to enable.", Key);
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var messenger in _messengers)
|
foreach (var messenger in _messengers)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue