diff --git a/src/Ombi/ErrorHandlingMiddlewear.cs b/src/Ombi/ErrorHandlingMiddlewear.cs index a50407ccd..ed0df0b95 100644 --- a/src/Ombi/ErrorHandlingMiddlewear.cs +++ b/src/Ombi/ErrorHandlingMiddlewear.cs @@ -2,6 +2,8 @@ using System.Net; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; using Newtonsoft.Json; namespace Ombi @@ -29,6 +31,8 @@ namespace Ombi private static Task HandleExceptionAsync(HttpContext context, Exception exception) { + var logger = context.RequestServices.GetService(); + logger.LogError(exception, "Something bad happened, ErrorMiddleware caught this"); var code = HttpStatusCode.InternalServerError; // 500 if unexpected //if (exception is NotFoundException) code = HttpStatusCode.NotFound; diff --git a/src/Ombi/Properties/launchSettings.json b/src/Ombi/Properties/launchSettings.json index ec5deb319..96b1ceb6e 100644 --- a/src/Ombi/Properties/launchSettings.json +++ b/src/Ombi/Properties/launchSettings.json @@ -3,13 +3,14 @@ "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { - "applicationUrl": "http://localhost:5000/", + "applicationUrl": "http://localhost:3579/", "sslPort": 0 } }, "profiles": { "IIS Express": { "commandName": "IISExpress", + "commandLineArgs": "--host http://*:3579", "launchBrowser": true, "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development"