Quellcode durchsuchen

Fixed logging exceptions

master
Teknikode vor 3 Monaten
Ursprung
Commit
2bb06b097c

+ 1
- 1
IdentityServer/Properties/PublishProfiles/Teknik Identity - Production.pubxml Datei anzeigen

@@ -11,7 +11,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<SiteUrlToLaunchAfterPublish>https://auth.teknik.io/</SiteUrlToLaunchAfterPublish>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>True</ExcludeApp_Data>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
<ProjectGuid>eb46e1eb-fdc2-4168-a0ad-8b284d44b13e</ProjectGuid>
<SelfContained>false</SelfContained>
<_IsPortable>true</_IsPortable>

+ 1
- 1
Teknik/Areas/Error/Controllers/ErrorController.cs Datei anzeigen

@@ -225,7 +225,7 @@ User Message:
message += " | User Agent: " + Request.Headers["User-Agent"].ToString();
}

_logger.Log(level, message, exception);
_logger.Log(level, exception, message);
}
}
}

+ 1
- 2
Teknik/Middleware/ErrorHandlerMiddleware.cs Datei anzeigen

@@ -45,7 +45,6 @@ namespace Teknik.Middleware
}
catch (Exception ex)
{
httpContext.Response.StatusCode = 500;
exception = ex;
}

@@ -78,7 +77,7 @@ namespace Teknik.Middleware
ErrorController errorController = new ErrorController(logger, config, dbContext);
errorController.ControllerContext = context;

if (httpContext.Response.StatusCode == 500)
if (httpContext.Response.StatusCode == 500 || exception != null)
{
await errorController.Http500(exception).ExecuteResultAsync(context);
}

+ 1
- 1
Teknik/Properties/PublishProfiles/Teknik - Production.pubxml Datei anzeigen

@@ -11,7 +11,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<SiteUrlToLaunchAfterPublish>https://www.teknik.io/</SiteUrlToLaunchAfterPublish>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>True</ExcludeApp_Data>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
<ProjectGuid>1e52f0d0-9e89-4022-a905-c685ef3564e1</ProjectGuid>
<SelfContained>false</SelfContained>
<_IsPortable>true</_IsPortable>

+ 34
- 34
Teknik/Properties/launchSettings.json Datei anzeigen

@@ -1,38 +1,38 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "https://localhost:23818",
"sslPort": 44362
}
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "https://localhost:23818",
"sslPort": 44362
}
},
"profiles": {
"TeknikCore": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "?sub=www",
"environmentVariables": {
"ASPNETCORE_URLS": "https://localhost:8050",
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Teknik - Prod": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "?sub=www",
"environmentVariables": {
"ASPNETCORE_URLS": "https://localhost:5050",
"ASPNETCORE_ENVIRONMENT": "Production"
}
},
"profiles": {
"TeknikCore": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "?sub=www",
"environmentVariables": {
"ASPNETCORE_URLS": "https://localhost:5050",
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Teknik - Prod": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "?sub=www",
"environmentVariables": {
"ASPNETCORE_URLS": "https://localhost:5050",
"ASPNETCORE_ENVIRONMENT": "Production"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_HTTPS_PORT": "44362",
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_HTTPS_PORT": "44362",
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

Laden…
Abbrechen
Speichern