#1001 Cleanup middleware #1068
No reviewers
Labels
No labels
_CRITICAL_
API
app
backEnd
Blocked, waiting for further changes
bug
cleanup
close
design
duplicate
enhancement
feature request
frontEnd
help wanted
invalid
low priority
needs input
needs review
project documentation
question
research
reviewed
script
security
SQL
style
testing
topLevel
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Andras/BoundlessFlowCampus2K!1068
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "#1001-cleanup-middleware"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replaced all Console.WriteLine with ILogger, Removed commented out/unused code and fixed typos.
So middleware is not like the services where you can just easily call ilogger. Can you check if you can find a way for it
@ -14,3 +12,3 @@private static string dbUser = Environment.GetEnvironmentVariable("DATABASE_USER");private static string dbPassword = Environment.GetEnvironmentVariable("DATABASE_PASSWORD");//private static string connectionString = $"Host=energy-db;Port=5432;Username={dbUser};Password={dbPassword};Database=";private static ILogger<Program> logger;Here it throws error
@ -23,6 +21,8 @@ public partial class Program/// <returns></returns>static async Task Main(string[] args){using var loggerFactory = LoggerFactory.Create(builder => builder.AddConsole());same here
Would need to add 2 new dependencies so I'm just gonna change it back to Console.WriteLine. @a24sakma
@c24carso wrote in #1068 (comment):
we can write a comment about why we did not change to Ilogger in program.cs why this is not changed in the middleware but it is changed in other places so that the next group do not need to go through the same
After some understanding about why Ilogger can not be applied and the need of libraries. It makes sense to go back to console write line like as Carl did.
the update and delete was removed as it was decided in mock up team with leaders.
the project runs as expected.
the services are functioning as expected.
I approve this issue. Good job!