Fix exception logging

This commit is contained in:
Bond_009
2018-12-20 13:11:26 +01:00
parent bf01918659
commit ea4c914123
123 changed files with 565 additions and 607 deletions

View File

@@ -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");
}
}

View File

@@ -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");
}
}
}

View File

@@ -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");
}
}

View File

@@ -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");
}
}
}

View File

@@ -66,7 +66,7 @@ namespace Emby.Server.Implementations.EntryPoints
}
catch (Exception ex)
{
_logger.LogError("Error sending message", ex);
_logger.LogError(ex, "Error sending message");
}
}

View File

@@ -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);
}
}

View File

@@ -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");
}
}

View File

@@ -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.");
}
}