aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2018-12-20 13:11:26 +0100
committerBond_009 <bond.009@outlook.com>2018-12-30 22:44:39 +0100
commitea4c914123ba8279b9d9fcf7d5318e11f7a3da4c (patch)
tree455bf175270ffd7c1cb8f4e4ea0fb41851f7c59e /Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
parentbf01918659986cc6cbaefaebb67f607aeb1b4400 (diff)
Fix exception logging
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/HttpListenerHost.cs')
-rw-r--r--Emby.Server.Implementations/HttpServer/HttpListenerHost.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
index 1d87d0e44..704b7f8a6 100644
--- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
+++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
@@ -252,7 +252,7 @@ namespace Emby.Server.Implementations.HttpServer
if (logExceptionStackTrace)
{
- _logger.LogError("Error processing request", ex);
+ _logger.LogError(ex, "Error processing request");
}
else if (logExceptionMessage)
{
@@ -272,9 +272,9 @@ namespace Emby.Server.Implementations.HttpServer
httpRes.ContentType = "text/html";
await Write(httpRes, NormalizeExceptionMessage(ex.Message)).ConfigureAwait(false);
}
- catch
+ catch (Exception errorEx)
{
- //_logger.LogError("Error this.ProcessRequest(context)(Exception while writing error to the response)", errorEx);
+ _logger.LogError(errorEx, "Error this.ProcessRequest(context)(Exception while writing error to the response)");
}
}
@@ -713,7 +713,7 @@ namespace Emby.Server.Implementations.HttpServer
var pathParts = pathInfo.TrimStart('/').Split('/');
if (pathParts.Length == 0)
{
- _logger.LogError("Path parts empty for PathInfo: {0}, Url: {1}", pathInfo, httpReq.RawUrl);
+ _logger.LogError("Path parts empty for PathInfo: {pathInfo}, Url: {RawUrl}", pathInfo, httpReq.RawUrl);
return null;
}
@@ -729,7 +729,7 @@ namespace Emby.Server.Implementations.HttpServer
};
}
- _logger.LogError("Could not find handler for {0}", pathInfo);
+ _logger.LogError("Could not find handler for {pathInfo}", pathInfo);
return null;
}
@@ -919,7 +919,7 @@ namespace Emby.Server.Implementations.HttpServer
return Task.CompletedTask;
}
- //_logger.LogDebug("Websocket message received: {0}", result.MessageType);
+ _logger.LogDebug("Websocket message received: {0}", result.MessageType);
var tasks = _webSocketListeners.Select(i => Task.Run(async () =>
{
@@ -929,7 +929,7 @@ namespace Emby.Server.Implementations.HttpServer
}
catch (Exception ex)
{
- _logger.LogError("{0} failed processing WebSocket message {1}", ex, i.GetType().Name, result.MessageType ?? string.Empty);
+ _logger.LogError(ex, "{0} failed processing WebSocket message {1}", i.GetType().Name, result.MessageType ?? string.Empty);
}
}));