Skip to content

Commit 5283d47

Browse files
committed
Enabled additional logging in sample
1 parent a789d36 commit 5283d47

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

samples/v2/3 - StudentManagerAspNetCore/Startup.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public void ConfigureServices(IServiceCollection services)
2525
services.AddSingleton<EmailService>();
2626

2727
services
28-
.AddTriggeredDbContextPool<ApplicationDbContext>(options => {
28+
.AddDbContext<ApplicationDbContext>(options => {
2929
options
3030
.UseSqlite("Data source=test.db")
3131
.UseTriggers(triggerOptions => {
@@ -37,6 +37,8 @@ public void ConfigureServices(IServiceCollection services)
3737
triggerOptions.AddTrigger<Triggers.Students.AssignRegistrationDate>();
3838
triggerOptions.AddTrigger<Triggers.Students.SignupToMandatoryCourses>();
3939
});
40+
41+
options.EnableSensitiveDataLogging(true);
4042
})
4143
.AddHttpContextAccessor();
4244
}

samples/v2/3 - StudentManagerAspNetCore/appsettings.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
22
"Logging": {
33
"LogLevel": {
4-
"Default": "Information",
5-
"Microsoft": "Information",
6-
"Microsoft.Hosting.Lifetime": "Information"
4+
"EntityFrameworkCore.Triggered.TriggerSession": "Information",
5+
"Microsoft.EntityFrameworkCore": "Information"
76
}
87
},
98
"AllowedHosts": "*"

0 commit comments

Comments
 (0)