From 909c124feb13d73a5a267f7574cbfcfa71538e71 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 22 Aug 2017 14:26:58 +0200 Subject: address review comments --- src/csharp/Grpc.Core/Logging/LogLevelFilterLogger.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/csharp/Grpc.Core/Logging/LogLevelFilterLogger.cs b/src/csharp/Grpc.Core/Logging/LogLevelFilterLogger.cs index a9c78a4a7a..a650d029d7 100644 --- a/src/csharp/Grpc.Core/Logging/LogLevelFilterLogger.cs +++ b/src/csharp/Grpc.Core/Logging/LogLevelFilterLogger.cs @@ -35,23 +35,23 @@ namespace Grpc.Core.Logging /// /// Creates and instance of LogLevelFilter. /// - public LogLevelFilterLogger(ILogger logger, LogLevel logLevel) : this(logger, logLevel, false) + public LogLevelFilterLogger(ILogger logger, LogLevel logLevel) { + this.innerLogger = GrpcPreconditions.CheckNotNull(logger); + this.logLevel = logLevel; } /// /// Creates and instance of LogLevelFilter. /// The fromEnvironmentVariable parameter allows looking up "GRPC_VERBOSITY" setting provided by C-core - /// and uses the same log level for C# logs. Using this setting is recommended as it makes the otherwise separate - /// C# and C-core logging settings work in lockstep and more intutively. + /// and uses the same log level for C# logs. Using this setting is recommended as it can prevent unintentionally hiding + /// C core logs requested by "GRPC_VERBOSITY" environment variable (which could happen if C# logger's log level was set to a more restrictive value). /// /// the logger to forward filtered logs to. /// the default log level, unless overriden by env variable. /// if true, override log level with setting from environment variable. - public LogLevelFilterLogger(ILogger logger, LogLevel defaultLogLevel, bool fromEnvironmentVariable) + public LogLevelFilterLogger(ILogger logger, LogLevel defaultLogLevel, bool fromEnvironmentVariable) : this(logger, GetLogLevelFromEnvironment(defaultLogLevel, fromEnvironmentVariable)) { - this.innerLogger = GrpcPreconditions.CheckNotNull(logger); - this.logLevel = GetLogLevelFromEnvironment(defaultLogLevel, fromEnvironmentVariable); } /// -- cgit v1.2.3