Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downgrade the ContextInitialized event from Information to Debug #28564

Merged
merged 1 commit into from
Aug 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/EFCore/Properties/CoreStrings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/EFCore/Properties/CoreStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@
</data>
<data name="LogContextInitialized" xml:space="preserve">
<value>Entity Framework Core {version} initialized '{contextType}' using provider '{provider}:{providerVersion}' with options: {options}</value>
<comment>Information CoreEventId.ContextInitialized string string string? string? string</comment>
<comment>Debug CoreEventId.ContextInitialized string string string? string? string</comment>
</data>
<data name="LogDetachedLazyLoading" xml:space="preserve">
<value>An attempt was made to lazy-load navigation '{navigation}' on a detached entity of type '{entityType}'. Lazy loading is not supported for detached entities or entities that are loaded with 'AsNoTracking'.</value>
Expand Down
3 changes: 3 additions & 0 deletions test/EFCore.Tests/DbContextLoggerTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Data.Common;

namespace Microsoft.EntityFrameworkCore;

public class DbContextLoggerTests
Expand Down Expand Up @@ -402,6 +404,7 @@ private static async Task<string> LogTest(
{
var options = configureLogging(
new DbContextOptionsBuilder<LoggingContext>()
.ConfigureWarnings(wb => wb.Log((CoreEventId.ContextInitialized, LogLevel.Information)))
.UseInMemoryDatabase("DbContextLoggerTests"))
.Options;

Expand Down