Skip to content

Commit b4ba5ce

Browse files
CopilotYunchuWang
andcommitted
Reduce logging verbosity in GrpcSidecarFixture to make test output organized
Co-authored-by: YunchuWang <[email protected]>
1 parent cb29e0b commit b4ba5ce

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/Grpc.IntegrationTests/GrpcSidecarFixture.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ public GrpcSidecarFixture()
2828
// Use a random port number to allow multiple instances to run in parallel
2929
string address = $"http://{ListenHost}:{Random.Shared.Next(30000, 40000)}";
3030
this.host = Host.CreateDefaultBuilder()
31+
.ConfigureLogging(logging =>
32+
{
33+
// Reduce logging verbosity to make test output more readable and organized.
34+
// Filter out noisy ASP.NET Core and gRPC infrastructure logs while keeping
35+
// important DurableTask sidecar logs for debugging.
36+
logging.SetMinimumLevel(LogLevel.Warning);
37+
logging.AddFilter("Microsoft.DurableTask.Sidecar", LogLevel.Information);
38+
logging.AddFilter("Microsoft.Hosting.Lifetime", LogLevel.Information);
39+
})
3140
.ConfigureWebHostDefaults(webBuilder =>
3241
{
3342
webBuilder

0 commit comments

Comments
 (0)