aboutsummaryrefslogtreecommitdiff
path: root/src/Web/DevHive.Web/Startup.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Web/DevHive.Web/Startup.cs')
-rw-r--r--src/Web/DevHive.Web/Startup.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Web/DevHive.Web/Startup.cs b/src/Web/DevHive.Web/Startup.cs
index 002c718..49fa408 100644
--- a/src/Web/DevHive.Web/Startup.cs
+++ b/src/Web/DevHive.Web/Startup.cs
@@ -5,6 +5,7 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using DevHive.Web.Configurations.Extensions;
using Newtonsoft.Json;
+using Serilog;
namespace DevHive.Web
{
@@ -33,6 +34,7 @@ namespace DevHive.Web
services.SwaggerConfiguration();
services.JWTConfiguration(Configuration);
services.AutoMapperConfiguration();
+ services.ConfigureExceptionHandler(this.Configuration);
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
@@ -46,7 +48,8 @@ namespace DevHive.Web
if (env.IsDevelopment())
{
- app.UseDeveloperExceptionPage();
+ app.UseExceptionHandlerMiddlewareConfiguration();
+ // app.UseDeveloperExceptionPage();
}
else
{
@@ -58,6 +61,8 @@ namespace DevHive.Web
app.UseDatabaseConfiguration();
app.UseAutoMapperConfiguration();
+ app.UseSerilogRequestLogging();
+
app.UseEndpoints(endpoints =>
{
endpoints.MapControllerRoute(