aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2017-08-22 14:26:58 +0200
committerGravatar Jan Tattermusch <jtattermusch@google.com>2017-08-22 14:26:58 +0200
commit909c124feb13d73a5a267f7574cbfcfa71538e71 (patch)
treed0cac9fe706aa5c16d9ba95812fa1dd2ed037489 /src
parentff6c03638d59863f0fcbd5d99f513b439af77c08 (diff)
address review comments
Diffstat (limited to 'src')
-rw-r--r--src/csharp/Grpc.Core/Logging/LogLevelFilterLogger.cs12
1 files 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
/// <summary>
/// Creates and instance of <c>LogLevelFilter.</c>
/// </summary>
- public LogLevelFilterLogger(ILogger logger, LogLevel logLevel) : this(logger, logLevel, false)
+ public LogLevelFilterLogger(ILogger logger, LogLevel logLevel)
{
+ this.innerLogger = GrpcPreconditions.CheckNotNull(logger);
+ this.logLevel = logLevel;
}
/// <summary>
/// Creates and instance of <c>LogLevelFilter.</c>
/// The <c>fromEnvironmentVariable</c> 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).
/// </summary>
/// <param name="logger">the logger to forward filtered logs to.</param>
/// <param name="defaultLogLevel">the default log level, unless overriden by env variable.</param>
/// <param name="fromEnvironmentVariable">if <c>true</c>, override log level with setting from environment variable.</param>
- 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);
}
/// <summary>