🔇 Lower some log level in pusher service
This commit is contained in:
@@ -57,7 +57,7 @@ public class WebSocketController(WebSocketService ws, ILogger<WebSocketContext>
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.LogInformation(
|
logger.LogDebug(
|
||||||
$"Connection established with user @{currentUser.Name}#{currentUser.Id} and device #{deviceId}");
|
$"Connection established with user @{currentUser.Name}#{currentUser.Id} and device #{deviceId}");
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -66,12 +66,13 @@ public class WebSocketController(WebSocketService ws, ILogger<WebSocketContext>
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"WebSocket Error: {ex.Message}");
|
if (ex is not WebSocketException)
|
||||||
|
logger.LogError(ex, "WebSocket disconnected with user @{UserName}#{UserId} and device #{DeviceId} unexpectedly");
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
ws.Disconnect(connectionKey);
|
ws.Disconnect(connectionKey);
|
||||||
logger.LogInformation(
|
logger.LogDebug(
|
||||||
$"Connection disconnected with user @{currentUser.Name}#{currentUser.Id} and device #{deviceId}"
|
$"Connection disconnected with user @{currentUser.Name}#{currentUser.Id} and device #{deviceId}"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -304,6 +304,6 @@ public class PushService
|
|||||||
}
|
}
|
||||||
|
|
||||||
_logger.LogInformation(
|
_logger.LogInformation(
|
||||||
$"Successfully pushed notification #{notification.Id} to device {subscription.DeviceId}");
|
$"Successfully pushed notification #{notification.Id} to device {subscription.DeviceId} provider {subscription.Provider}");
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user