From 584959fcb1ce9063f335b1f082373048324cecd4 Mon Sep 17 00:00:00 2001 From: "Md. Solaiman Shohag" Date: Thu, 3 Jun 2021 23:13:36 +0600 Subject: [PATCH 01/11] Added new service ResultProcessing --- .../Controllers/HelloWorldController.cs | 15 +++++ .../ResultProcessing.API/Program.cs | 26 ++++++++ .../ResultProcessing.API.csproj | 11 ++++ .../ResultProcessing.API/Startup.cs | 60 +++++++++++++++++++ .../appsettings.Development.json | 9 +++ .../ResultProcessing.API/appsettings.json | 10 ++++ 6 files changed, 131 insertions(+) create mode 100644 src/Services/ResultProcessing/ResultProcessing.API/Controllers/HelloWorldController.cs create mode 100644 src/Services/ResultProcessing/ResultProcessing.API/Program.cs create mode 100644 src/Services/ResultProcessing/ResultProcessing.API/ResultProcessing.API.csproj create mode 100644 src/Services/ResultProcessing/ResultProcessing.API/Startup.cs create mode 100644 src/Services/ResultProcessing/ResultProcessing.API/appsettings.Development.json create mode 100644 src/Services/ResultProcessing/ResultProcessing.API/appsettings.json diff --git a/src/Services/ResultProcessing/ResultProcessing.API/Controllers/HelloWorldController.cs b/src/Services/ResultProcessing/ResultProcessing.API/Controllers/HelloWorldController.cs new file mode 100644 index 00000000..7b9b6972 --- /dev/null +++ b/src/Services/ResultProcessing/ResultProcessing.API/Controllers/HelloWorldController.cs @@ -0,0 +1,15 @@ +using Microsoft.AspNetCore.Mvc; + +namespace ResultProcessing.API.Controllers +{ + [ApiController] + [Route("[controller]")] + public class HelloWorldController : ControllerBase + { + [HttpGet] + public static string Ping() + { + return "Pong"; + } + } +} diff --git a/src/Services/ResultProcessing/ResultProcessing.API/Program.cs b/src/Services/ResultProcessing/ResultProcessing.API/Program.cs new file mode 100644 index 00000000..171e8e0e --- /dev/null +++ b/src/Services/ResultProcessing/ResultProcessing.API/Program.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; + +namespace ResultProcessing.API +{ + public class Program + { + public static void Main(string[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + }); + } +} diff --git a/src/Services/ResultProcessing/ResultProcessing.API/ResultProcessing.API.csproj b/src/Services/ResultProcessing/ResultProcessing.API/ResultProcessing.API.csproj new file mode 100644 index 00000000..28847161 --- /dev/null +++ b/src/Services/ResultProcessing/ResultProcessing.API/ResultProcessing.API.csproj @@ -0,0 +1,11 @@ + + + + net5.0 + + + + + + + diff --git a/src/Services/ResultProcessing/ResultProcessing.API/Startup.cs b/src/Services/ResultProcessing/ResultProcessing.API/Startup.cs new file mode 100644 index 00000000..05b8a501 --- /dev/null +++ b/src/Services/ResultProcessing/ResultProcessing.API/Startup.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.HttpsPolicy; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using Microsoft.OpenApi.Models; + +namespace ResultProcessing.API +{ + public class Startup + { + public Startup(IConfiguration configuration) + { + Configuration = configuration; + } + + public IConfiguration Configuration { get; } + + // This method gets called by the runtime. Use this method to add services to the container. + public void ConfigureServices(IServiceCollection services) + { + + services.AddControllers(); + services.AddSwaggerGen(c => + { + c.SwaggerDoc("v1", new OpenApiInfo { Title = "ResultProcessing.API", Version = "v1" }); + }); + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + + } + app.UseSwagger(); + app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "ResultProcessing.API v1")); + + app.UseHttpsRedirection(); + + app.UseRouting(); + + app.UseAuthorization(); + + app.UseEndpoints(endpoints => + { + endpoints.MapControllers(); + }); + } + } +} diff --git a/src/Services/ResultProcessing/ResultProcessing.API/appsettings.Development.json b/src/Services/ResultProcessing/ResultProcessing.API/appsettings.Development.json new file mode 100644 index 00000000..8983e0fc --- /dev/null +++ b/src/Services/ResultProcessing/ResultProcessing.API/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + } +} diff --git a/src/Services/ResultProcessing/ResultProcessing.API/appsettings.json b/src/Services/ResultProcessing/ResultProcessing.API/appsettings.json new file mode 100644 index 00000000..d9d9a9bf --- /dev/null +++ b/src/Services/ResultProcessing/ResultProcessing.API/appsettings.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*" +} From 92fe13eab7868d89771ac17afbd2e56689f517a7 Mon Sep 17 00:00:00 2001 From: "Md. Solaiman Shohag" Date: Thu, 3 Jun 2021 23:15:22 +0600 Subject: [PATCH 02/11] Added service ResultProessing --- eSchool.sln | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/eSchool.sln b/eSchool.sln index 02ebdc1a..ff5d134a 100644 --- a/eSchool.sln +++ b/eSchool.sln @@ -41,6 +41,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frontend.Blazor.Server", "s EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frontend.Blazor.Shared", "src\Web\Frontend.Blazor\Frontend.Blazor.Shared\Frontend.Blazor.Shared.csproj", "{4EB86635-CF79-4D15-909E-C41C98B0B586}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ResultProcessing", "ResultProcessing", "{EB120E71-6A5B-4465-91D4-5B1E28496F03}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResultProcessing.API", "src\Services\ResultProcessing\ResultProcessing.API\ResultProcessing.API.csproj", "{7C3EACBC-F09F-49DC-9DBD-0487764AFE24}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -195,6 +199,18 @@ Global {4EB86635-CF79-4D15-909E-C41C98B0B586}.Release|x64.Build.0 = Release|Any CPU {4EB86635-CF79-4D15-909E-C41C98B0B586}.Release|x86.ActiveCfg = Release|Any CPU {4EB86635-CF79-4D15-909E-C41C98B0B586}.Release|x86.Build.0 = Release|Any CPU + {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Debug|x64.ActiveCfg = Debug|Any CPU + {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Debug|x64.Build.0 = Debug|Any CPU + {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Debug|x86.ActiveCfg = Debug|Any CPU + {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Debug|x86.Build.0 = Debug|Any CPU + {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Release|Any CPU.Build.0 = Release|Any CPU + {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Release|x64.ActiveCfg = Release|Any CPU + {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Release|x64.Build.0 = Release|Any CPU + {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Release|x86.ActiveCfg = Release|Any CPU + {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -217,6 +233,8 @@ Global {53F4E6F9-6B91-45F9-97F9-F6EFA0EBEFCE} = {0C00A596-0FE3-4FA6-B54B-FE2BE83371EF} {3BABD4D9-56A1-4BA3-B30C-30E6765AB389} = {0C00A596-0FE3-4FA6-B54B-FE2BE83371EF} {4EB86635-CF79-4D15-909E-C41C98B0B586} = {0C00A596-0FE3-4FA6-B54B-FE2BE83371EF} + {EB120E71-6A5B-4465-91D4-5B1E28496F03} = {1C120673-72F4-4679-AC4C-68286E9091A5} + {7C3EACBC-F09F-49DC-9DBD-0487764AFE24} = {EB120E71-6A5B-4465-91D4-5B1E28496F03} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E418719F-3193-403E-AF58-9BE9F94FD8BE} From 60fd84f66b909037ad5babd2929139ed02bd9c18 Mon Sep 17 00:00:00 2001 From: "Md. Solaiman Shohag" Date: Sun, 6 Jun 2021 14:46:10 +0600 Subject: [PATCH 03/11] Changed ResultProcessing service name to ExamManagement service. --- eSchool.sln | 14 +++++++------- .../Controllers/HelloWorldController.cs | 6 +++--- ...ssing.API.csproj => ExamManagement.API.csproj} | 6 +++++- .../ResultProcessing.API/Program.cs | 8 +------- .../ResultProcessing.API/Startup.cs | 15 ++++----------- 5 files changed, 20 insertions(+), 29 deletions(-) rename src/Services/ResultProcessing/ResultProcessing.API/{ResultProcessing.API.csproj => ExamManagement.API.csproj} (64%) diff --git a/eSchool.sln b/eSchool.sln index ff5d134a..c30204f9 100644 --- a/eSchool.sln +++ b/eSchool.sln @@ -27,23 +27,23 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebStatus", "src\Web\WebSta EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{74511F4E-FF9D-42C4-9531-A75C61270B73}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTelemetry", "src\Libraries\OpenTelemetry\OpenTelemetry.csproj", "{7B410F3B-36E0-4853-9B4E-41D0CC2865B5}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry", "src\Libraries\OpenTelemetry\OpenTelemetry.csproj", "{7B410F3B-36E0-4853-9B4E-41D0CC2865B5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ApiGateways", "ApiGateways", "{256317ED-A2C8-48A0-9C6E-D6EB1F7D0BE0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eSchool.GraphQL", "src\ApiGateways\eSchool.GraphQL\eSchool.GraphQL.csproj", "{4053591A-1C1A-4A81-8496-F2FF7EAB2D5C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "eSchool.GraphQL", "src\ApiGateways\eSchool.GraphQL\eSchool.GraphQL.csproj", "{4053591A-1C1A-4A81-8496-F2FF7EAB2D5C}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Frontend.Blazor", "Frontend.Blazor", "{0C00A596-0FE3-4FA6-B54B-FE2BE83371EF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frontend.Blazor.Client", "src\Web\Frontend.Blazor\Frontend.Blazor.Client\Frontend.Blazor.Client.csproj", "{53F4E6F9-6B91-45F9-97F9-F6EFA0EBEFCE}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Frontend.Blazor.Client", "src\Web\Frontend.Blazor\Frontend.Blazor.Client\Frontend.Blazor.Client.csproj", "{53F4E6F9-6B91-45F9-97F9-F6EFA0EBEFCE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frontend.Blazor.Server", "src\Web\Frontend.Blazor\Frontend.Blazor.Server\Frontend.Blazor.Server.csproj", "{3BABD4D9-56A1-4BA3-B30C-30E6765AB389}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Frontend.Blazor.Server", "src\Web\Frontend.Blazor\Frontend.Blazor.Server\Frontend.Blazor.Server.csproj", "{3BABD4D9-56A1-4BA3-B30C-30E6765AB389}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frontend.Blazor.Shared", "src\Web\Frontend.Blazor\Frontend.Blazor.Shared\Frontend.Blazor.Shared.csproj", "{4EB86635-CF79-4D15-909E-C41C98B0B586}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Frontend.Blazor.Shared", "src\Web\Frontend.Blazor\Frontend.Blazor.Shared\Frontend.Blazor.Shared.csproj", "{4EB86635-CF79-4D15-909E-C41C98B0B586}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ResultProcessing", "ResultProcessing", "{EB120E71-6A5B-4465-91D4-5B1E28496F03}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ExamManagement", "ExamManagement", "{EB120E71-6A5B-4465-91D4-5B1E28496F03}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResultProcessing.API", "src\Services\ResultProcessing\ResultProcessing.API\ResultProcessing.API.csproj", "{7C3EACBC-F09F-49DC-9DBD-0487764AFE24}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExamManagement.API", "src\Services\ResultProcessing\ResultProcessing.API\ExamManagement.API.csproj", "{7C3EACBC-F09F-49DC-9DBD-0487764AFE24}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/src/Services/ResultProcessing/ResultProcessing.API/Controllers/HelloWorldController.cs b/src/Services/ResultProcessing/ResultProcessing.API/Controllers/HelloWorldController.cs index 7b9b6972..e00053bf 100644 --- a/src/Services/ResultProcessing/ResultProcessing.API/Controllers/HelloWorldController.cs +++ b/src/Services/ResultProcessing/ResultProcessing.API/Controllers/HelloWorldController.cs @@ -1,15 +1,15 @@ using Microsoft.AspNetCore.Mvc; -namespace ResultProcessing.API.Controllers +namespace ExamManagement.API.Controllers { [ApiController] [Route("[controller]")] public class HelloWorldController : ControllerBase { [HttpGet] - public static string Ping() + public ActionResult Ping() { - return "Pong"; + return Ok("Pong"); } } } diff --git a/src/Services/ResultProcessing/ResultProcessing.API/ResultProcessing.API.csproj b/src/Services/ResultProcessing/ResultProcessing.API/ExamManagement.API.csproj similarity index 64% rename from src/Services/ResultProcessing/ResultProcessing.API/ResultProcessing.API.csproj rename to src/Services/ResultProcessing/ResultProcessing.API/ExamManagement.API.csproj index 28847161..282b19cd 100644 --- a/src/Services/ResultProcessing/ResultProcessing.API/ResultProcessing.API.csproj +++ b/src/Services/ResultProcessing/ResultProcessing.API/ExamManagement.API.csproj @@ -5,7 +5,11 @@ - + + + + + diff --git a/src/Services/ResultProcessing/ResultProcessing.API/Program.cs b/src/Services/ResultProcessing/ResultProcessing.API/Program.cs index 171e8e0e..5a93fcb3 100644 --- a/src/Services/ResultProcessing/ResultProcessing.API/Program.cs +++ b/src/Services/ResultProcessing/ResultProcessing.API/Program.cs @@ -1,13 +1,7 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; -namespace ResultProcessing.API +namespace ExamManagement.API { public class Program { diff --git a/src/Services/ResultProcessing/ResultProcessing.API/Startup.cs b/src/Services/ResultProcessing/ResultProcessing.API/Startup.cs index 05b8a501..f9634ae3 100644 --- a/src/Services/ResultProcessing/ResultProcessing.API/Startup.cs +++ b/src/Services/ResultProcessing/ResultProcessing.API/Startup.cs @@ -1,18 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.HttpsPolicy; -using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; using Microsoft.OpenApi.Models; -namespace ResultProcessing.API +namespace ExamManagement.API { public class Startup { @@ -30,7 +23,7 @@ public void ConfigureServices(IServiceCollection services) services.AddControllers(); services.AddSwaggerGen(c => { - c.SwaggerDoc("v1", new OpenApiInfo { Title = "ResultProcessing.API", Version = "v1" }); + c.SwaggerDoc("v1", new OpenApiInfo { Title = "ExamManagement.API", Version = "v1" }); }); } @@ -40,10 +33,10 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); - + } app.UseSwagger(); - app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "ResultProcessing.API v1")); + app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "ExamManagement.API v1")); app.UseHttpsRedirection(); From 8726a1b27f1b8794e53a24fd59ea0b5d26438c5d Mon Sep 17 00:00:00 2001 From: "Md. Solaiman Shohag" Date: Sun, 6 Jun 2021 15:57:13 +0600 Subject: [PATCH 04/11] Root folder name changed to ExamManagement from ResultProcessing --- eSchool.sln | 32 +++++++++---------- .../Controllers/HelloWorldController.cs | 0 .../ExamManagement.API.csproj | 0 .../ExamManagement.API}/Program.cs | 0 .../ExamManagement.API}/Startup.cs | 0 .../appsettings.Development.json | 0 .../ExamManagement.API}/appsettings.json | 0 7 files changed, 16 insertions(+), 16 deletions(-) rename src/Services/{ResultProcessing/ResultProcessing.API => ExamManagement/ExamManagement.API}/Controllers/HelloWorldController.cs (100%) rename src/Services/{ResultProcessing/ResultProcessing.API => ExamManagement/ExamManagement.API}/ExamManagement.API.csproj (100%) rename src/Services/{ResultProcessing/ResultProcessing.API => ExamManagement/ExamManagement.API}/Program.cs (100%) rename src/Services/{ResultProcessing/ResultProcessing.API => ExamManagement/ExamManagement.API}/Startup.cs (100%) rename src/Services/{ResultProcessing/ResultProcessing.API => ExamManagement/ExamManagement.API}/appsettings.Development.json (100%) rename src/Services/{ResultProcessing/ResultProcessing.API => ExamManagement/ExamManagement.API}/appsettings.json (100%) diff --git a/eSchool.sln b/eSchool.sln index c30204f9..0993632a 100644 --- a/eSchool.sln +++ b/eSchool.sln @@ -41,9 +41,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Frontend.Blazor.Server", "s EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Frontend.Blazor.Shared", "src\Web\Frontend.Blazor\Frontend.Blazor.Shared\Frontend.Blazor.Shared.csproj", "{4EB86635-CF79-4D15-909E-C41C98B0B586}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ExamManagement", "ExamManagement", "{EB120E71-6A5B-4465-91D4-5B1E28496F03}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ExamManagement", "ExamManagement", "{53B8221A-7791-47BC-BEAF-6971EE4FE8EF}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExamManagement.API", "src\Services\ResultProcessing\ResultProcessing.API\ExamManagement.API.csproj", "{7C3EACBC-F09F-49DC-9DBD-0487764AFE24}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExamManagement.API", "src\Services\ExamManagement\ExamManagement.API\ExamManagement.API.csproj", "{2F6B1739-927F-4CF2-BB21-995C73C2E7A3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -199,18 +199,18 @@ Global {4EB86635-CF79-4D15-909E-C41C98B0B586}.Release|x64.Build.0 = Release|Any CPU {4EB86635-CF79-4D15-909E-C41C98B0B586}.Release|x86.ActiveCfg = Release|Any CPU {4EB86635-CF79-4D15-909E-C41C98B0B586}.Release|x86.Build.0 = Release|Any CPU - {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Debug|x64.ActiveCfg = Debug|Any CPU - {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Debug|x64.Build.0 = Debug|Any CPU - {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Debug|x86.ActiveCfg = Debug|Any CPU - {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Debug|x86.Build.0 = Debug|Any CPU - {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Release|Any CPU.Build.0 = Release|Any CPU - {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Release|x64.ActiveCfg = Release|Any CPU - {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Release|x64.Build.0 = Release|Any CPU - {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Release|x86.ActiveCfg = Release|Any CPU - {7C3EACBC-F09F-49DC-9DBD-0487764AFE24}.Release|x86.Build.0 = Release|Any CPU + {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Debug|x64.ActiveCfg = Debug|Any CPU + {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Debug|x64.Build.0 = Debug|Any CPU + {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Debug|x86.ActiveCfg = Debug|Any CPU + {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Debug|x86.Build.0 = Debug|Any CPU + {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Release|Any CPU.Build.0 = Release|Any CPU + {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Release|x64.ActiveCfg = Release|Any CPU + {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Release|x64.Build.0 = Release|Any CPU + {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Release|x86.ActiveCfg = Release|Any CPU + {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -233,8 +233,8 @@ Global {53F4E6F9-6B91-45F9-97F9-F6EFA0EBEFCE} = {0C00A596-0FE3-4FA6-B54B-FE2BE83371EF} {3BABD4D9-56A1-4BA3-B30C-30E6765AB389} = {0C00A596-0FE3-4FA6-B54B-FE2BE83371EF} {4EB86635-CF79-4D15-909E-C41C98B0B586} = {0C00A596-0FE3-4FA6-B54B-FE2BE83371EF} - {EB120E71-6A5B-4465-91D4-5B1E28496F03} = {1C120673-72F4-4679-AC4C-68286E9091A5} - {7C3EACBC-F09F-49DC-9DBD-0487764AFE24} = {EB120E71-6A5B-4465-91D4-5B1E28496F03} + {53B8221A-7791-47BC-BEAF-6971EE4FE8EF} = {1C120673-72F4-4679-AC4C-68286E9091A5} + {2F6B1739-927F-4CF2-BB21-995C73C2E7A3} = {53B8221A-7791-47BC-BEAF-6971EE4FE8EF} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E418719F-3193-403E-AF58-9BE9F94FD8BE} diff --git a/src/Services/ResultProcessing/ResultProcessing.API/Controllers/HelloWorldController.cs b/src/Services/ExamManagement/ExamManagement.API/Controllers/HelloWorldController.cs similarity index 100% rename from src/Services/ResultProcessing/ResultProcessing.API/Controllers/HelloWorldController.cs rename to src/Services/ExamManagement/ExamManagement.API/Controllers/HelloWorldController.cs diff --git a/src/Services/ResultProcessing/ResultProcessing.API/ExamManagement.API.csproj b/src/Services/ExamManagement/ExamManagement.API/ExamManagement.API.csproj similarity index 100% rename from src/Services/ResultProcessing/ResultProcessing.API/ExamManagement.API.csproj rename to src/Services/ExamManagement/ExamManagement.API/ExamManagement.API.csproj diff --git a/src/Services/ResultProcessing/ResultProcessing.API/Program.cs b/src/Services/ExamManagement/ExamManagement.API/Program.cs similarity index 100% rename from src/Services/ResultProcessing/ResultProcessing.API/Program.cs rename to src/Services/ExamManagement/ExamManagement.API/Program.cs diff --git a/src/Services/ResultProcessing/ResultProcessing.API/Startup.cs b/src/Services/ExamManagement/ExamManagement.API/Startup.cs similarity index 100% rename from src/Services/ResultProcessing/ResultProcessing.API/Startup.cs rename to src/Services/ExamManagement/ExamManagement.API/Startup.cs diff --git a/src/Services/ResultProcessing/ResultProcessing.API/appsettings.Development.json b/src/Services/ExamManagement/ExamManagement.API/appsettings.Development.json similarity index 100% rename from src/Services/ResultProcessing/ResultProcessing.API/appsettings.Development.json rename to src/Services/ExamManagement/ExamManagement.API/appsettings.Development.json diff --git a/src/Services/ResultProcessing/ResultProcessing.API/appsettings.json b/src/Services/ExamManagement/ExamManagement.API/appsettings.json similarity index 100% rename from src/Services/ResultProcessing/ResultProcessing.API/appsettings.json rename to src/Services/ExamManagement/ExamManagement.API/appsettings.json From b552e87b246d033a315ca26095cb2bb66fc1ae8c Mon Sep 17 00:00:00 2001 From: "Md. Solaiman Shohag" Date: Sat, 12 Jun 2021 22:27:36 +0600 Subject: [PATCH 05/11] eSchool.sln removed --- eSchool.sln | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/eSchool.sln b/eSchool.sln index 0993632a..ebe59606 100644 --- a/eSchool.sln +++ b/eSchool.sln @@ -27,23 +27,23 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebStatus", "src\Web\WebSta EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{74511F4E-FF9D-42C4-9531-A75C61270B73}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry", "src\Libraries\OpenTelemetry\OpenTelemetry.csproj", "{7B410F3B-36E0-4853-9B4E-41D0CC2865B5}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTelemetry", "src\Libraries\OpenTelemetry\OpenTelemetry.csproj", "{7B410F3B-36E0-4853-9B4E-41D0CC2865B5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ApiGateways", "ApiGateways", "{256317ED-A2C8-48A0-9C6E-D6EB1F7D0BE0}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "eSchool.GraphQL", "src\ApiGateways\eSchool.GraphQL\eSchool.GraphQL.csproj", "{4053591A-1C1A-4A81-8496-F2FF7EAB2D5C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eSchool.GraphQL", "src\ApiGateways\eSchool.GraphQL\eSchool.GraphQL.csproj", "{4053591A-1C1A-4A81-8496-F2FF7EAB2D5C}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Frontend.Blazor", "Frontend.Blazor", "{0C00A596-0FE3-4FA6-B54B-FE2BE83371EF}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Frontend.Blazor.Client", "src\Web\Frontend.Blazor\Frontend.Blazor.Client\Frontend.Blazor.Client.csproj", "{53F4E6F9-6B91-45F9-97F9-F6EFA0EBEFCE}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frontend.Blazor.Client", "src\Web\Frontend.Blazor\Frontend.Blazor.Client\Frontend.Blazor.Client.csproj", "{53F4E6F9-6B91-45F9-97F9-F6EFA0EBEFCE}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Frontend.Blazor.Server", "src\Web\Frontend.Blazor\Frontend.Blazor.Server\Frontend.Blazor.Server.csproj", "{3BABD4D9-56A1-4BA3-B30C-30E6765AB389}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frontend.Blazor.Server", "src\Web\Frontend.Blazor\Frontend.Blazor.Server\Frontend.Blazor.Server.csproj", "{3BABD4D9-56A1-4BA3-B30C-30E6765AB389}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Frontend.Blazor.Shared", "src\Web\Frontend.Blazor\Frontend.Blazor.Shared\Frontend.Blazor.Shared.csproj", "{4EB86635-CF79-4D15-909E-C41C98B0B586}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frontend.Blazor.Shared", "src\Web\Frontend.Blazor\Frontend.Blazor.Shared\Frontend.Blazor.Shared.csproj", "{4EB86635-CF79-4D15-909E-C41C98B0B586}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ExamManagement", "ExamManagement", "{53B8221A-7791-47BC-BEAF-6971EE4FE8EF}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CertificateProcessing", "CertificateProcessing", "{38032F91-9580-44DC-AF92-0F562D7126F8}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExamManagement.API", "src\Services\ExamManagement\ExamManagement.API\ExamManagement.API.csproj", "{2F6B1739-927F-4CF2-BB21-995C73C2E7A3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CertificateProcessing.API", "src\Services\CertificateProcessing\CertificateProcessing.API\CertificateProcessing.API.csproj", "{7C7B638F-A1E9-4908-91DD-4060E45F2CE5}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -199,18 +199,18 @@ Global {4EB86635-CF79-4D15-909E-C41C98B0B586}.Release|x64.Build.0 = Release|Any CPU {4EB86635-CF79-4D15-909E-C41C98B0B586}.Release|x86.ActiveCfg = Release|Any CPU {4EB86635-CF79-4D15-909E-C41C98B0B586}.Release|x86.Build.0 = Release|Any CPU - {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Debug|x64.ActiveCfg = Debug|Any CPU - {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Debug|x64.Build.0 = Debug|Any CPU - {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Debug|x86.ActiveCfg = Debug|Any CPU - {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Debug|x86.Build.0 = Debug|Any CPU - {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Release|Any CPU.Build.0 = Release|Any CPU - {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Release|x64.ActiveCfg = Release|Any CPU - {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Release|x64.Build.0 = Release|Any CPU - {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Release|x86.ActiveCfg = Release|Any CPU - {2F6B1739-927F-4CF2-BB21-995C73C2E7A3}.Release|x86.Build.0 = Release|Any CPU + {7C7B638F-A1E9-4908-91DD-4060E45F2CE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7C7B638F-A1E9-4908-91DD-4060E45F2CE5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7C7B638F-A1E9-4908-91DD-4060E45F2CE5}.Debug|x64.ActiveCfg = Debug|Any CPU + {7C7B638F-A1E9-4908-91DD-4060E45F2CE5}.Debug|x64.Build.0 = Debug|Any CPU + {7C7B638F-A1E9-4908-91DD-4060E45F2CE5}.Debug|x86.ActiveCfg = Debug|Any CPU + {7C7B638F-A1E9-4908-91DD-4060E45F2CE5}.Debug|x86.Build.0 = Debug|Any CPU + {7C7B638F-A1E9-4908-91DD-4060E45F2CE5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7C7B638F-A1E9-4908-91DD-4060E45F2CE5}.Release|Any CPU.Build.0 = Release|Any CPU + {7C7B638F-A1E9-4908-91DD-4060E45F2CE5}.Release|x64.ActiveCfg = Release|Any CPU + {7C7B638F-A1E9-4908-91DD-4060E45F2CE5}.Release|x64.Build.0 = Release|Any CPU + {7C7B638F-A1E9-4908-91DD-4060E45F2CE5}.Release|x86.ActiveCfg = Release|Any CPU + {7C7B638F-A1E9-4908-91DD-4060E45F2CE5}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -233,8 +233,8 @@ Global {53F4E6F9-6B91-45F9-97F9-F6EFA0EBEFCE} = {0C00A596-0FE3-4FA6-B54B-FE2BE83371EF} {3BABD4D9-56A1-4BA3-B30C-30E6765AB389} = {0C00A596-0FE3-4FA6-B54B-FE2BE83371EF} {4EB86635-CF79-4D15-909E-C41C98B0B586} = {0C00A596-0FE3-4FA6-B54B-FE2BE83371EF} - {53B8221A-7791-47BC-BEAF-6971EE4FE8EF} = {1C120673-72F4-4679-AC4C-68286E9091A5} - {2F6B1739-927F-4CF2-BB21-995C73C2E7A3} = {53B8221A-7791-47BC-BEAF-6971EE4FE8EF} + {38032F91-9580-44DC-AF92-0F562D7126F8} = {1C120673-72F4-4679-AC4C-68286E9091A5} + {7C7B638F-A1E9-4908-91DD-4060E45F2CE5} = {38032F91-9580-44DC-AF92-0F562D7126F8} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E418719F-3193-403E-AF58-9BE9F94FD8BE} From 2254785912b450754b3718a96134995b48e1de9d Mon Sep 17 00:00:00 2001 From: "Md. Solaiman Shohag" Date: Sat, 3 Jul 2021 21:42:01 +0600 Subject: [PATCH 06/11] Removed https redirection --- src/Services/ExamManagement/ExamManagement.API/Startup.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Services/ExamManagement/ExamManagement.API/Startup.cs b/src/Services/ExamManagement/ExamManagement.API/Startup.cs index f9634ae3..168d4f85 100644 --- a/src/Services/ExamManagement/ExamManagement.API/Startup.cs +++ b/src/Services/ExamManagement/ExamManagement.API/Startup.cs @@ -38,8 +38,6 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) app.UseSwagger(); app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "ExamManagement.API v1")); - app.UseHttpsRedirection(); - app.UseRouting(); app.UseAuthorization(); From 93f00aeb3ece2f6206d0e987a15bba06644cbe84 Mon Sep 17 00:00:00 2001 From: "Md. Solaiman Shohag" Date: Sat, 3 Jul 2021 22:56:39 +0600 Subject: [PATCH 07/11] Removed fxcopanalyzers package --- .../ExamManagement.API/ExamManagement.API.csproj | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Services/ExamManagement/ExamManagement.API/ExamManagement.API.csproj b/src/Services/ExamManagement/ExamManagement.API/ExamManagement.API.csproj index 282b19cd..cb117ccc 100644 --- a/src/Services/ExamManagement/ExamManagement.API/ExamManagement.API.csproj +++ b/src/Services/ExamManagement/ExamManagement.API/ExamManagement.API.csproj @@ -8,8 +8,5 @@ - - - From 2f34741e26d8514f0ff1c391ca4bd9c77dd34639 Mon Sep 17 00:00:00 2001 From: "Md. Solaiman Shohag" Date: Wed, 18 Aug 2021 23:01:31 +0600 Subject: [PATCH 08/11] Integrate Seq and Seriloq in ExamManagementService --- .../ExamManagement.API.csproj | 3 + .../ExamManagement.API/Program.cs | 60 ++++++++++++++++++- .../ExamManagement.API/Startup.cs | 11 +++- 3 files changed, 71 insertions(+), 3 deletions(-) diff --git a/src/Services/ExamManagement/ExamManagement.API/ExamManagement.API.csproj b/src/Services/ExamManagement/ExamManagement.API/ExamManagement.API.csproj index cb117ccc..b7095b38 100644 --- a/src/Services/ExamManagement/ExamManagement.API/ExamManagement.API.csproj +++ b/src/Services/ExamManagement/ExamManagement.API/ExamManagement.API.csproj @@ -5,6 +5,9 @@ + + + diff --git a/src/Services/ExamManagement/ExamManagement.API/Program.cs b/src/Services/ExamManagement/ExamManagement.API/Program.cs index 5a93fcb3..43e3b539 100644 --- a/src/Services/ExamManagement/ExamManagement.API/Program.cs +++ b/src/Services/ExamManagement/ExamManagement.API/Program.cs @@ -1,20 +1,76 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Hosting; +using Serilog; +using Serilog.Enrichers.Span; namespace ExamManagement.API { public class Program { + public static readonly string Namespace = typeof(Program).Namespace!; + public static readonly string AppName = Namespace.Substring(Namespace.LastIndexOf('.', Namespace.LastIndexOf('.') - 1) + 1); + + [System.Diagnostics.CodeAnalysis.SuppressMessage( + "Design", + "CA1031:Do not catch general exception types", + Justification = "Top level all exception catcher")] public static void Main(string[] args) { - CreateHostBuilder(args).Build().Run(); + Activity.DefaultIdFormat = ActivityIdFormat.W3C; + + var configuration = GetConfiguration(); + + Log.Logger = CreateSerilogLogger(configuration); + try + { + Log.Information("Configuring web host ({ApplicationContext})...", AppName); + CreateHostBuilder(args).Build().Run(); + + return 0; + } + catch (Exception ex) + { + Log.Fatal(ex, "Host terminated unexpectedly"); + return 1; + } + finally + { + Log.CloseAndFlush(); + } + } - public static IHostBuilder CreateHostBuilder(string[] args) => + public static IHostBuilder CreateHostBuilder(IConfiguration configuration,string[] args) => Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); + webBuilder.UseConfiguration(configuration); + webBuilder.UseSerilog(); }); + + private static ILogger CreateSerilogLogger(IConfiguration configuration) + { + return new LoggerConfiguration() + .MinimumLevel.Verbose() + .Enrich.WithProperty("ApplicationContext", AppName) + .Enrich.FromLogContext() + .Enrich.WithSpan() + .WriteTo.Console() + .WriteTo.Seq("http://seq") + .ReadFrom.Configuration(configuration) + .CreateLogger(); + } + + private static IConfiguration GetConfiguration() + { + var builder = new ConfigurationBuilder() + .SetBasePath(Directory.GetCurrentDirectory()) + .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) + .AddEnvironmentVariables(); + + // Load other configurations here. Ex. Keyvault or AppConfiguration + return builder.Build(); + } } } diff --git a/src/Services/ExamManagement/ExamManagement.API/Startup.cs b/src/Services/ExamManagement/ExamManagement.API/Startup.cs index 168d4f85..2d0c9e6e 100644 --- a/src/Services/ExamManagement/ExamManagement.API/Startup.cs +++ b/src/Services/ExamManagement/ExamManagement.API/Startup.cs @@ -4,6 +4,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.OpenApi.Models; +using Serilog; namespace ExamManagement.API { @@ -28,13 +29,21 @@ public void ConfigureServices(IServiceCollection services) } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) { + var pathBase = Configuration["PATH_BASE"]; + if (!string.IsNullOrEmpty(pathBase)) + { + loggerFactory.CreateLogger().LogInformation("Using PATH BASE '{pathBase}'", pathBase); + app.UsePathBase(pathBase); + } + if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } + app.UseSerilogRequestLogging(); app.UseSwagger(); app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "ExamManagement.API v1")); From 66a5fc196b8d0d458a277f921941874f5c95801c Mon Sep 17 00:00:00 2001 From: "Md. Solaiman Shohag" Date: Wed, 18 Aug 2021 23:57:42 +0600 Subject: [PATCH 09/11] Integrate seq and serilog in ExamManagementService --- src/Services/ExamManagement/ExamManagement.API/Program.cs | 1 - src/Services/ExamManagement/ExamManagement.API/Startup.cs | 1 - 2 files changed, 2 deletions(-) diff --git a/src/Services/ExamManagement/ExamManagement.API/Program.cs b/src/Services/ExamManagement/ExamManagement.API/Program.cs index 43e3b539..d6a478e3 100644 --- a/src/Services/ExamManagement/ExamManagement.API/Program.cs +++ b/src/Services/ExamManagement/ExamManagement.API/Program.cs @@ -69,7 +69,6 @@ private static IConfiguration GetConfiguration() .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) .AddEnvironmentVariables(); - // Load other configurations here. Ex. Keyvault or AppConfiguration return builder.Build(); } } diff --git a/src/Services/ExamManagement/ExamManagement.API/Startup.cs b/src/Services/ExamManagement/ExamManagement.API/Startup.cs index 2d0c9e6e..ae8cf90b 100644 --- a/src/Services/ExamManagement/ExamManagement.API/Startup.cs +++ b/src/Services/ExamManagement/ExamManagement.API/Startup.cs @@ -41,7 +41,6 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerF if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); - } app.UseSerilogRequestLogging(); app.UseSwagger(); From 85420d0ba814952678d15c03496bb404516ab0ca Mon Sep 17 00:00:00 2001 From: "Md. Solaiman Shohag" Date: Thu, 19 Aug 2021 00:11:13 +0600 Subject: [PATCH 10/11] Integrate seq and serilog in ExamManagementService --- src/Services/ExamManagement/ExamManagement.API/Program.cs | 1 - src/Services/ExamManagement/ExamManagement.API/Startup.cs | 1 - 2 files changed, 2 deletions(-) diff --git a/src/Services/ExamManagement/ExamManagement.API/Program.cs b/src/Services/ExamManagement/ExamManagement.API/Program.cs index d6a478e3..9fd9bb2e 100644 --- a/src/Services/ExamManagement/ExamManagement.API/Program.cs +++ b/src/Services/ExamManagement/ExamManagement.API/Program.cs @@ -37,7 +37,6 @@ public static void Main(string[] args) { Log.CloseAndFlush(); } - } public static IHostBuilder CreateHostBuilder(IConfiguration configuration,string[] args) => diff --git a/src/Services/ExamManagement/ExamManagement.API/Startup.cs b/src/Services/ExamManagement/ExamManagement.API/Startup.cs index ae8cf90b..8dd19730 100644 --- a/src/Services/ExamManagement/ExamManagement.API/Startup.cs +++ b/src/Services/ExamManagement/ExamManagement.API/Startup.cs @@ -28,7 +28,6 @@ public void ConfigureServices(IServiceCollection services) }); } - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) { var pathBase = Configuration["PATH_BASE"]; From fb82cacfd73a3aaefd0ecfc99a9077a83e0a5aaf Mon Sep 17 00:00:00 2001 From: "Md. Solaiman Shohag" Date: Sat, 4 Sep 2021 21:00:34 +0600 Subject: [PATCH 11/11] Added serilog in appsettings.json --- .../ExamManagement.API/appsettings.Development.json | 9 --------- .../ExamManagement.API/appsettings.json | 11 +++++++---- 2 files changed, 7 insertions(+), 13 deletions(-) delete mode 100644 src/Services/ExamManagement/ExamManagement.API/appsettings.Development.json diff --git a/src/Services/ExamManagement/ExamManagement.API/appsettings.Development.json b/src/Services/ExamManagement/ExamManagement.API/appsettings.Development.json deleted file mode 100644 index 8983e0fc..00000000 --- a/src/Services/ExamManagement/ExamManagement.API/appsettings.Development.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - } -} diff --git a/src/Services/ExamManagement/ExamManagement.API/appsettings.json b/src/Services/ExamManagement/ExamManagement.API/appsettings.json index d9d9a9bf..bb6dc2e6 100644 --- a/src/Services/ExamManagement/ExamManagement.API/appsettings.json +++ b/src/Services/ExamManagement/ExamManagement.API/appsettings.json @@ -1,9 +1,12 @@ { - "Logging": { - "LogLevel": { + "Serilog": { + "MinimumLevel": { "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" + "Override": { + "Microsoft": "Warning", + "OpenCodeFoundation": "Information", + "System": "Warning" + } } }, "AllowedHosts": "*"