Fix log highlithing
This commit is contained in:
parent
30f4392872
commit
058c35e739
|
@ -3,7 +3,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Globalization;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
|
@ -242,18 +241,17 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
|
|
||||||
private async Task ErrorHandler(Exception ex, IRequest httpReq, bool logExceptionStackTrace, string urlToLog)
|
private async Task ErrorHandler(Exception ex, IRequest httpReq, bool logExceptionStackTrace, string urlToLog)
|
||||||
{
|
{
|
||||||
string urlSuffix = string.Format(CultureInfo.InvariantCulture, "; URL being processed: {0}", urlToLog);
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ex = GetActualException(ex);
|
ex = GetActualException(ex);
|
||||||
|
|
||||||
if (logExceptionStackTrace)
|
if (logExceptionStackTrace)
|
||||||
{
|
{
|
||||||
_logger.LogError(ex, "Error processing request{Suffix}", urlSuffix);
|
_logger.LogError(ex, "Error processing request; URL being processed: {Url}", urlToLog);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_logger.LogError("Error processing request: {Message}{Suffix}", ex.Message, urlSuffix);
|
_logger.LogError("Error processing request: {Message}; URL being processed: {Url}", ex.Message, urlToLog);
|
||||||
}
|
}
|
||||||
|
|
||||||
var httpRes = httpReq.Response;
|
var httpRes = httpReq.Response;
|
||||||
|
@ -273,7 +271,7 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
}
|
}
|
||||||
catch (Exception errorEx)
|
catch (Exception errorEx)
|
||||||
{
|
{
|
||||||
_logger.LogError(errorEx, "Error this.ProcessRequest(context)(Exception while writing error to the response){Suffix}", urlSuffix);
|
_logger.LogError(errorEx, "Error this.ProcessRequest(context)(Exception while writing error to the response); URL being processed: {Url}", urlToLog);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user