diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2018-12-30 17:29:02 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-30 17:29:02 -0500 |
| commit | 1f02cf4b7e13c932bc30968cbb74b71885fd3eb7 (patch) | |
| tree | 2fbf2e570340765abd40b5ad8e491f1f212699c0 /Emby.Server.Implementations/HttpServer/LoggerUtils.cs | |
| parent | 7ad023143062c1995178e5700961b553822bd5af (diff) | |
| parent | 4c95aee52eda793d1e013164cc0fde9eb609f894 (diff) | |
Merge pull request #285 from Bond-009/logging
Use Serilog to handle logging
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/LoggerUtils.cs')
| -rw-r--r-- | Emby.Server.Implementations/HttpServer/LoggerUtils.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/HttpServer/LoggerUtils.cs b/Emby.Server.Implementations/HttpServer/LoggerUtils.cs index 3aa48efd4..5b7bbe79c 100644 --- a/Emby.Server.Implementations/HttpServer/LoggerUtils.cs +++ b/Emby.Server.Implementations/HttpServer/LoggerUtils.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Logging; +using Microsoft.Extensions.Logging; using System; using System.Globalization; using MediaBrowser.Model.Services; @@ -11,7 +11,7 @@ namespace Emby.Server.Implementations.HttpServer { if (headers == null) { - logger.Info("{0} {1}. UserAgent: {2}", "HTTP " + method, url, userAgent ?? string.Empty); + logger.LogInformation("{0} {1}. UserAgent: {2}", "HTTP " + method, url, userAgent ?? string.Empty); } else { @@ -30,7 +30,7 @@ namespace Emby.Server.Implementations.HttpServer index++; } - logger.Info("HTTP {0} {1}. {2}", method, url, headerText); + logger.LogInformation("HTTP {0} {1}. {2}", method, url, headerText); } } @@ -49,7 +49,7 @@ namespace Emby.Server.Implementations.HttpServer //var headerText = headers == null ? string.Empty : "Headers: " + string.Join(", ", headers.Where(i => i.Name.IndexOf("Access-", StringComparison.OrdinalIgnoreCase) == -1).Select(i => i.Name + "=" + i.Value).ToArray()); var headerText = string.Empty; - logger.Info("HTTP Response {0} to {1}. Time: {2}{3}. {4} {5}", statusCode, endPoint, Convert.ToInt32(durationMs).ToString(CultureInfo.InvariantCulture), logSuffix, url, headerText); + logger.LogInformation("HTTP Response {0} to {1}. Time: {2}{3}. {4} {5}", statusCode, endPoint, Convert.ToInt32(durationMs).ToString(CultureInfo.InvariantCulture), logSuffix, url, headerText); } } } |
