diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-10-28 15:40:38 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-10-28 15:40:38 -0400 |
| commit | 9b998a068a2622f43ac813800654e357f94d0c21 (patch) | |
| tree | 3026f8a9d53a40a6860f9c417f1dacdc5bfbee98 /MediaBrowser.Server.Implementations/HttpServer/LoggerUtils.cs | |
| parent | 813c715489ff4d1b8d18de895f82d405939ec289 (diff) | |
update image encoding
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer/LoggerUtils.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/HttpServer/LoggerUtils.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/LoggerUtils.cs b/MediaBrowser.Server.Implementations/HttpServer/LoggerUtils.cs index 02ce38ef1..fae702023 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/LoggerUtils.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/LoggerUtils.cs @@ -16,7 +16,10 @@ namespace MediaBrowser.Server.Implementations.HttpServer /// <param name="duration">The duration.</param> public static void LogResponse(ILogger logger, int statusCode, string url, string endPoint, TimeSpan duration) { - logger.Info("HTTP Response {0} to {1}. Time: {2}ms. {3}", statusCode, endPoint, Convert.ToInt32(duration.TotalMilliseconds).ToString(CultureInfo.InvariantCulture), url); + var durationMs = duration.TotalMilliseconds; + var logSuffix = durationMs >= 1000 ? "ms (slow)" : "ms"; + + logger.Info("HTTP Response {0} to {1}. Time: {2}{3}. {4}", statusCode, endPoint, Convert.ToInt32(durationMs).ToString(CultureInfo.InvariantCulture), logSuffix, url); } } } |
