diff --git a/LiMan.Api/LiMan.APi.csproj b/LiMan.Api/LiMan.APi.csproj index 1fc6766..67dd475 100644 --- a/LiMan.Api/LiMan.APi.csproj +++ b/LiMan.Api/LiMan.APi.csproj @@ -1,26 +1,37 @@ - + - - net5.0 - + + net5.0 + - - C:\Users\samuele\source\repos\LiManApp\LiMan.Api\LiMan.APi.xml - + + C:\Users\samuele\source\repos\LiManApp\LiMan.Api\LiMan.APi.xml + true + - - - - - + + + + + - - - - + + + + + - - - - + + + + + + + + Always + + + Always + + \ No newline at end of file diff --git a/LiMan.Api/NLog.config b/LiMan.Api/NLog.config new file mode 100644 index 0000000..bd41408 --- /dev/null +++ b/LiMan.Api/NLog.config @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/LiMan.Api/Program.cs b/LiMan.Api/Program.cs index 7d0aefc..fa6d00c 100644 --- a/LiMan.Api/Program.cs +++ b/LiMan.Api/Program.cs @@ -11,16 +11,30 @@ namespace LiMan.Serv { public class Program { - public static void Main(string[] args) - { - CreateHostBuilder(args).Build().Run(); - } + #region Protected Fields + + // https://github.com/NLog/NLog/wiki/Getting-started-with-ASP.NET-Core-5 + // https://codewithmukesh.com/blog/logging-with-nlog-in-aspnet-core/ + protected static NLog.Logger logger = NLog.Web.NLogBuilder.ConfigureNLog("NLog.config").GetCurrentClassLogger(); + + #endregion Protected Fields + + #region Public Methods public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); + logger.Info("LiMan.API HostBuilder Done"); }); + + public static void Main(string[] args) + { + logger.Info("LiMan.API Application Starting Up"); + CreateHostBuilder(args).Build().Run(); + } + + #endregion Public Methods } -} +} \ No newline at end of file diff --git a/LiMan.Api/Properties/PublishProfiles/IIS01.pubxml b/LiMan.Api/Properties/PublishProfiles/IIS01.pubxml index f6333f7..0270ab7 100644 --- a/LiMan.Api/Properties/PublishProfiles/IIS01.pubxml +++ b/LiMan.Api/Properties/PublishProfiles/IIS01.pubxml @@ -4,25 +4,25 @@ This file is used by the publish/package process of your Web project. You can cu by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121. --> - - true - MSDeploy - Release - Any CPU - - True - False - 34200ca2-489c-435a-a60b-34de7b7ba04d - https://IIS01:8172/MsDeploy.axd - Default Web Site/ELM.API - - True - WMSVC - False - True - jenkins - <_SavePWD>True - net5.0 - false - + + true + MSDeploy + True + Release + Any CPU + + False + 34200ca2-489c-435a-a60b-34de7b7ba04d + false + https://IIS01:8172/MsDeploy.axd + Default Web Site/ELM.API + + False + WMSVC + True + True + jenkins + <_SavePWD>True + net5.0 + \ No newline at end of file diff --git a/LiMan.Api/Properties/PublishProfiles/IIS01.pubxml.user b/LiMan.Api/Properties/PublishProfiles/IIS01.pubxml.user index e70f53c..91e85c9 100644 --- a/LiMan.Api/Properties/PublishProfiles/IIS01.pubxml.user +++ b/LiMan.Api/Properties/PublishProfiles/IIS01.pubxml.user @@ -7,6 +7,6 @@ by editing this MSBuild file. In order to learn more about this please visit htt AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAk75miMJLMkCTEelQutKpbwAAAAACAAAAAAADZgAAwAAAABAAAAA7RC2yFYQ+sbph7Gm3hrEMAAAAAASAAACgAAAAEAAAAFhL9j1HkRjMaqEESfncpZcYAAAAIMz57CMDX9ZLAPLwms1/yHQTf/r/v74FFAAAAB6WaNF8er6HZmelU4da+AsQFSC5 - True|2021-10-21T06:48:23.1235907Z;True|2021-10-21T08:48:18.3291685+02:00;True|2021-10-15T11:33:23.1161895+02:00;True|2021-10-15T11:26:37.7646366+02:00;True|2021-10-15T11:26:08.9411561+02:00;True|2021-10-15T11:25:36.6377010+02:00;True|2021-10-15T11:25:15.7375383+02:00;True|2021-10-15T11:20:26.4607123+02:00;True|2021-10-15T11:13:33.8524245+02:00;False|2021-10-15T10:30:42.4253422+02:00;False|2021-10-15T10:27:43.8339493+02:00;False|2021-10-15T10:23:05.0864739+02:00;False|2021-10-15T10:22:43.2958457+02:00;False|2021-10-15T10:22:15.0954116+02:00;True|2021-10-15T10:15:10.5127570+02:00;False|2021-10-15T10:13:53.0299219+02:00;False|2021-10-15T08:58:38.3028788+02:00;False|2021-10-15T08:47:48.5789826+02:00;False|2021-10-14T19:32:56.5281204+02:00;False|2021-10-14T19:31:10.1629370+02:00;True|2021-05-26T19:49:30.0427896+02:00;False|2021-05-26T19:49:14.9065510+02:00;True|2021-05-25T17:48:33.3901785+02:00;True|2021-05-25T17:46:09.2063020+02:00;True|2021-05-25T17:42:47.8167539+02:00;True|2021-05-25T17:22:03.1877438+02:00;True|2021-05-25T17:21:05.1565775+02:00;True|2021-05-25T16:26:34.1426996+02:00;True|2021-05-25T16:14:28.2842402+02:00;True|2021-05-25T15:02:11.7131495+02:00; + True|2021-10-21T15:47:07.5800856Z;True|2021-10-21T17:45:53.9877689+02:00;True|2021-10-21T17:45:26.3424924+02:00;True|2021-10-21T17:44:04.8901686+02:00;True|2021-10-21T17:12:38.0143120+02:00;True|2021-10-21T12:48:27.8969428+02:00;True|2021-10-21T12:45:17.7896250+02:00;True|2021-10-21T12:44:18.8941191+02:00;True|2021-10-21T08:48:23.1235907+02:00;True|2021-10-21T08:48:18.3291685+02:00;True|2021-10-15T11:33:23.1161895+02:00;True|2021-10-15T11:26:37.7646366+02:00;True|2021-10-15T11:26:08.9411561+02:00;True|2021-10-15T11:25:36.6377010+02:00;True|2021-10-15T11:25:15.7375383+02:00;True|2021-10-15T11:20:26.4607123+02:00;True|2021-10-15T11:13:33.8524245+02:00;False|2021-10-15T10:30:42.4253422+02:00;False|2021-10-15T10:27:43.8339493+02:00;False|2021-10-15T10:23:05.0864739+02:00;False|2021-10-15T10:22:43.2958457+02:00;False|2021-10-15T10:22:15.0954116+02:00;True|2021-10-15T10:15:10.5127570+02:00;False|2021-10-15T10:13:53.0299219+02:00;False|2021-10-15T08:58:38.3028788+02:00;False|2021-10-15T08:47:48.5789826+02:00;False|2021-10-14T19:32:56.5281204+02:00;False|2021-10-14T19:31:10.1629370+02:00;True|2021-05-26T19:49:30.0427896+02:00;False|2021-05-26T19:49:14.9065510+02:00;True|2021-05-25T17:48:33.3901785+02:00;True|2021-05-25T17:46:09.2063020+02:00;True|2021-05-25T17:42:47.8167539+02:00;True|2021-05-25T17:22:03.1877438+02:00;True|2021-05-25T17:21:05.1565775+02:00;True|2021-05-25T16:26:34.1426996+02:00;True|2021-05-25T16:14:28.2842402+02:00;True|2021-05-25T15:02:11.7131495+02:00; \ No newline at end of file diff --git a/LiMan.Api/Properties/PublishProfiles/IIS02.pubxml b/LiMan.Api/Properties/PublishProfiles/IIS02.pubxml index dbe074e..bab6e96 100644 --- a/LiMan.Api/Properties/PublishProfiles/IIS02.pubxml +++ b/LiMan.Api/Properties/PublishProfiles/IIS02.pubxml @@ -4,25 +4,25 @@ This file is used by the publish/package process of your Web project. You can cu by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121. --> - - true - MSDeploy - Release - Any CPU - - True - False - 34200ca2-489c-435a-a60b-34de7b7ba04d - https://IIS02:8172/MsDeploy.axd - Default Web Site/ELM.API - - True - WMSVC - False - True - jenkins - <_SavePWD>True - net5.0 - false - + + true + MSDeploy + True + Release + Any CPU + + False + 34200ca2-489c-435a-a60b-34de7b7ba04d + false + https://IIS02:8172/MsDeploy.axd + Default Web Site/ELM.API + + False + WMSVC + True + True + jenkins + <_SavePWD>True + net5.0 + \ No newline at end of file diff --git a/LiMan.Api/Properties/PublishProfiles/IIS02.pubxml.user b/LiMan.Api/Properties/PublishProfiles/IIS02.pubxml.user index aca1976..5bb6415 100644 --- a/LiMan.Api/Properties/PublishProfiles/IIS02.pubxml.user +++ b/LiMan.Api/Properties/PublishProfiles/IIS02.pubxml.user @@ -7,6 +7,6 @@ by editing this MSBuild file. In order to learn more about this please visit htt AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAk75miMJLMkCTEelQutKpbwAAAAACAAAAAAADZgAAwAAAABAAAAA7RC2yFYQ+sbph7Gm3hrEMAAAAAASAAACgAAAAEAAAAFhL9j1HkRjMaqEESfncpZcYAAAAIMz57CMDX9ZLAPLwms1/yHQTf/r/v74FFAAAAB6WaNF8er6HZmelU4da+AsQFSC5 - True|2021-10-21T06:48:42.2014540Z;True|2021-10-21T08:48:38.0576948+02:00;True|2021-10-21T08:48:31.5097766+02:00;True|2021-10-15T10:15:10.5127570+02:00;False|2021-10-15T10:13:53.0299219+02:00;False|2021-10-15T08:58:38.3028788+02:00;False|2021-10-15T08:47:48.5789826+02:00;False|2021-10-14T19:32:56.5281204+02:00;False|2021-10-14T19:31:10.1629370+02:00;True|2021-05-26T19:49:30.0427896+02:00;False|2021-05-26T19:49:14.9065510+02:00;True|2021-05-25T17:48:33.3901785+02:00;True|2021-05-25T17:46:09.2063020+02:00;True|2021-05-25T17:42:47.8167539+02:00;True|2021-05-25T17:22:03.1877438+02:00;True|2021-05-25T17:21:05.1565775+02:00;True|2021-05-25T16:26:34.1426996+02:00;True|2021-05-25T16:14:28.2842402+02:00;True|2021-05-25T15:02:11.7131495+02:00; + True|2021-10-21T15:10:41.5356616Z;True|2021-10-21T17:09:53.6684540+02:00;True|2021-10-21T12:51:53.0071793+02:00;True|2021-10-21T12:50:27.0123409+02:00;True|2021-10-21T08:48:42.2014540+02:00;True|2021-10-21T08:48:38.0576948+02:00;True|2021-10-21T08:48:31.5097766+02:00;True|2021-10-15T10:15:10.5127570+02:00;False|2021-10-15T10:13:53.0299219+02:00;False|2021-10-15T08:58:38.3028788+02:00;False|2021-10-15T08:47:48.5789826+02:00;False|2021-10-14T19:32:56.5281204+02:00;False|2021-10-14T19:31:10.1629370+02:00;True|2021-05-26T19:49:30.0427896+02:00;False|2021-05-26T19:49:14.9065510+02:00;True|2021-05-25T17:48:33.3901785+02:00;True|2021-05-25T17:46:09.2063020+02:00;True|2021-05-25T17:42:47.8167539+02:00;True|2021-05-25T17:22:03.1877438+02:00;True|2021-05-25T17:21:05.1565775+02:00;True|2021-05-25T16:26:34.1426996+02:00;True|2021-05-25T16:14:28.2842402+02:00;True|2021-05-25T15:02:11.7131495+02:00; \ No newline at end of file diff --git a/LiMan.Api/Startup.cs b/LiMan.Api/Startup.cs index 10b7ccc..495c66b 100644 --- a/LiMan.Api/Startup.cs +++ b/LiMan.Api/Startup.cs @@ -42,8 +42,6 @@ namespace LiMan.Serv if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); - //app.UseSwagger(); - //app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "LiMan.Serv v1")); } app.UseSwagger(c => diff --git a/LiMan.Api/appsettings.Development.json b/LiMan.Api/appsettings.Development.json index 8983e0f..fb218b9 100644 --- a/LiMan.Api/appsettings.Development.json +++ b/LiMan.Api/appsettings.Development.json @@ -1,9 +1,10 @@ { - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" + "DetailedErrors": true, + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } } - } -} +} \ No newline at end of file diff --git a/LiMan.Api/appsettings.Production.json b/LiMan.Api/appsettings.Production.json new file mode 100644 index 0000000..c0c8018 --- /dev/null +++ b/LiMan.Api/appsettings.Production.json @@ -0,0 +1,11 @@ +{ + "DetailedErrors": true, + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "Environment": "PROD" +} \ No newline at end of file diff --git a/LiMan.Api/appsettings.Staging.json b/LiMan.Api/appsettings.Staging.json new file mode 100644 index 0000000..5bb0442 --- /dev/null +++ b/LiMan.Api/appsettings.Staging.json @@ -0,0 +1,11 @@ +{ + "DetailedErrors": true, + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "Environment": "STAG" +} \ No newline at end of file diff --git a/LiMan.Api/appsettings.json b/LiMan.Api/appsettings.json index ad09909..51ed134 100644 --- a/LiMan.Api/appsettings.json +++ b/LiMan.Api/appsettings.json @@ -8,8 +8,8 @@ }, "AllowedHosts": "*", "ConnectionStrings": { - "LiMan.GLS": "Server=SQLSTEAM;Database=SteamWare_Auth;User ID=sa;Password=keyhammer;integrated security=False;MultipleActiveResultSets=True;App=LiMan.UI;", - "LiMan.DB": "Server=SQLSTEAM;Database=LiMan.DB;User ID=sa;Password=keyhammer;integrated security=False;MultipleActiveResultSets=True;App=LiMan.UI;", + "LiMan.GLS": "Server=SQLSTEAM;Database=SteamWare_Auth;User ID=sa;Password=keyhammer;integrated security=False;MultipleActiveResultSets=True;App=LiMan.API;", + "LiMan.DB": "Server=SQLSTEAM;Database=LiMan.DB;User ID=sa;Password=keyhammer;integrated security=False;MultipleActiveResultSets=True;App=LiMan.API;", "Redis": "localhost:6379" } } \ No newline at end of file diff --git a/LiMan.Api/logs/.placeholder.txt b/LiMan.Api/logs/.placeholder.txt new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/LiMan.Api/logs/.placeholder.txt @@ -0,0 +1 @@ + \ No newline at end of file