From 6be28f1dd99153c09d453668f81c19d620500461 Mon Sep 17 00:00:00 2001 From: Jon Skeet <jonskeet@google.com> Date: Tue, 26 Jul 2016 13:37:39 +0100 Subject: [PATCH] Change the default logger to the NullLogger. It's unconventional for code to log to the console in .NET. Even now the logging is reduced, it's still present - especially in shutdown. This would fix #7361. --- src/csharp/Grpc.Core/GrpcEnvironment.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/csharp/Grpc.Core/GrpcEnvironment.cs b/src/csharp/Grpc.Core/GrpcEnvironment.cs index eeed699712..574e900a0e 100644 --- a/src/csharp/Grpc.Core/GrpcEnvironment.cs +++ b/src/csharp/Grpc.Core/GrpcEnvironment.cs @@ -47,7 +47,6 @@ namespace Grpc.Core /// </summary> public class GrpcEnvironment { - const LogLevel DefaultLogLevel = LogLevel.Info; const int MinDefaultThreadPoolSize = 4; static object staticLock = new object(); @@ -58,7 +57,7 @@ namespace Grpc.Core static readonly HashSet<Channel> registeredChannels = new HashSet<Channel>(); static readonly HashSet<Server> registeredServers = new HashSet<Server>(); - static ILogger logger = new LogLevelFilterLogger(new ConsoleLogger(), DefaultLogLevel); + static ILogger logger = new NullLogger(); readonly object myLock = new object(); readonly GrpcThreadPool threadPool; -- GitLab