mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-27 19:08:27 +01:00
Fix exception logging
This commit is contained in:
@@ -73,7 +73,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError("Error restarting server", ex);
|
||||
_logger.LogError(ex, "Error restarting server");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -98,7 +98,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError("Error getting timers", ex);
|
||||
_logger.LogError(ex, "Error getting timers");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -216,7 +216,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
catch
|
||||
{
|
||||
// Commenting out because users are reporting problems out of our control
|
||||
//_logger.LogError("Error creating port forwarding rules", ex);
|
||||
//_logger.LogError(ex, "Error creating port forwarding rules");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -253,6 +253,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Error creating http port map");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -262,6 +263,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Error creating https port map");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -309,7 +311,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError("Error stopping NAT Discovery", ex);
|
||||
_logger.LogError(ex, "Error stopping NAT Discovery");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError("Error resetting system standby timer", ex);
|
||||
_logger.LogError(ex, "Error resetting system standby timer");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -331,7 +331,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError("Error in GetLibraryUpdateInfo", ex);
|
||||
_logger.LogError(ex, "Error in GetLibraryUpdateInfo");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -346,7 +346,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError("Error sending LibraryChanged message", ex);
|
||||
_logger.LogError(ex, "Error sending LibraryChanged message");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError("Error sending message", ex);
|
||||
_logger.LogError(ex, "Error sending message");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -156,14 +156,10 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
try
|
||||
{
|
||||
await _sessionManager.SendMessageToAdminSessions(name, data, CancellationToken.None);
|
||||
}
|
||||
catch (ObjectDisposedException)
|
||||
{
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
//Logger.LogError("Error sending message", ex);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,14 +168,10 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
try
|
||||
{
|
||||
await _sessionManager.SendMessageToUserSessions(new List<Guid> { user.Id }, name, data, CancellationToken.None);
|
||||
}
|
||||
catch (ObjectDisposedException)
|
||||
{
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
//Logger.LogError("Error sending message", ex);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError("Failed to start UDP Server", ex);
|
||||
_logger.LogError(ex, "Failed to start UDP Server");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//_logger.LogError("Error sending anonymous usage statistics.", ex);
|
||||
_logger.LogError(ex, "Error sending anonymous usage statistics.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//_logger.LogError("Error sending anonymous usage statistics.", ex);
|
||||
_logger.LogError(ex, "Error sending anonymous usage statistics.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user