mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-24 01:34:45 +03:00
update logging
This commit is contained in:
@@ -228,11 +228,14 @@ namespace Emby.Server.Implementations.HttpServer
|
||||
}
|
||||
}
|
||||
|
||||
private void ErrorHandler(Exception ex, IRequest httpReq)
|
||||
private void ErrorHandler(Exception ex, IRequest httpReq, bool logException = true)
|
||||
{
|
||||
try
|
||||
{
|
||||
_logger.ErrorException("Error processing request", ex);
|
||||
if (logException)
|
||||
{
|
||||
_logger.ErrorException("Error processing request", ex);
|
||||
}
|
||||
|
||||
var httpRes = httpReq.Response;
|
||||
|
||||
@@ -529,6 +532,10 @@ namespace Emby.Server.Implementations.HttpServer
|
||||
ErrorHandler(new FileNotFoundException(), httpReq);
|
||||
}
|
||||
}
|
||||
catch (OperationCanceledException ex)
|
||||
{
|
||||
ErrorHandler(ex, httpReq, false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrorHandler(ex, httpReq);
|
||||
|
||||
Reference in New Issue
Block a user