Vote count: 0 I am using Flask application and default python logging lib for log When i am trying to log to /var/log/flask_app.log. Its give me permission error as i am not ruing my flask with root. Which is right location to place logs for my application ? Can we place application log to /var/log... how can we get rid of permission issue ? This question is little opinionated but any advice would help. Thanks asked 41 secs agoPradeep Jaiswar Let's block ads!...
ادامه مطلبVote count: 0 I have an Entity Framework Core + ASP.NET Core application and when my application starts up I want to ensure that the database is created, and eventually (once I have migrations) I want to ensure that those are also run. Initially I put Database.EnsureCreated() into the constructor of my DbContext but that appears to run every time someone hits my application since a new instance of the DbContext is created each time. I tried to put it into my startup code, but I need an instance of my DbContext to do that and it is unclear how exactly to get one. I am configuring EF as so: serviceCollection.AddEntityFramework() .AddSqlServer() .AddDbContext(options => options.UseSqlServer(......
ادامه مطلب