mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-18 06:53:07 +03:00
rework nfo savers
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
using System.Globalization;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
|
||||
@@ -14,8 +12,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||
/// </summary>
|
||||
/// <param name="logger">The logger.</param>
|
||||
/// <param name="request">The request.</param>
|
||||
/// <param name="workerIndex">Index of the worker.</param>
|
||||
public static void LogRequest(ILogger logger, HttpListenerRequest request, int workerIndex)
|
||||
public static void LogRequest(ILogger logger, HttpListenerRequest request)
|
||||
{
|
||||
var log = new StringBuilder();
|
||||
|
||||
@@ -32,21 +29,19 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||
/// Logs the response.
|
||||
/// </summary>
|
||||
/// <param name="logger">The logger.</param>
|
||||
/// <param name="response">The response.</param>
|
||||
/// <param name="statusCode">The status code.</param>
|
||||
/// <param name="url">The URL.</param>
|
||||
/// <param name="endPoint">The end point.</param>
|
||||
/// <param name="duration">The duration.</param>
|
||||
public static void LogResponse(ILogger logger, HttpListenerResponse response, string url, IPEndPoint endPoint, TimeSpan duration)
|
||||
public static void LogResponse(ILogger logger, int statusCode, string url, string endPoint, TimeSpan duration)
|
||||
{
|
||||
var statusCode = response.StatusCode;
|
||||
|
||||
var log = new StringBuilder();
|
||||
|
||||
log.AppendLine(string.Format("Url: {0}", url));
|
||||
|
||||
//log.AppendLine("Headers: " + string.Join(",", response.Headers.AllKeys.Select(k => k + "=" + response.Headers[k])));
|
||||
|
||||
var responseTime = string.Format(". Response time: {0} ms. Content length: {1} bytes.", duration.TotalMilliseconds, response.ContentLength64.ToString(CultureInfo.InvariantCulture));
|
||||
var responseTime = string.Format(". Response time: {0} ms.", duration.TotalMilliseconds);
|
||||
|
||||
var msg = "HTTP Response " + statusCode + " to " + endPoint + responseTime;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user