Skip to content

Commit

Permalink
change of some names
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-knozderko committed Sep 18, 2023
1 parent 0bb27d0 commit 193f87e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Snowflake.Data/Logger/EasyLoggerManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ public virtual void ReconfigureEasyLogging(EasyLoggingLogLevel easyLoggingLogLev
var appender = string.Equals(logsPath, "STDOUT", StringComparison.OrdinalIgnoreCase)
? AddConsoleAppender(rootLogger)
: AddRollingFileAppender(rootLogger, logsPath);
RemoveOtherAppendersForEasyLogging(rootLogger, appender);
RemoveOtherEasyLoggingAppenders(rootLogger, appender);
repository.RaiseConfigurationChanged(EventArgs.Empty);
}
}

private static void RemoveOtherAppendersForEasyLogging(log4net.Repository.Hierarchy.Logger logger, IAppender appender)
private static void RemoveOtherEasyLoggingAppenders(log4net.Repository.Hierarchy.Logger logger, IAppender appender)
{
var existingAppenders = logger.Appenders.ToArray();
foreach (var existingAppender in existingAppenders)
{
if (IsAppenderCreatedForEasyLogging(existingAppender) && existingAppender != appender)
if (IsEasyLoggingAppender(existingAppender) && existingAppender != appender)
{
logger.RemoveAppender(existingAppender);
}
Expand Down Expand Up @@ -73,7 +73,7 @@ private static IAppender AddRollingFileAppender(log4net.Repository.Hierarchy.Log
return appender;
}

private static bool IsAppenderCreatedForEasyLogging(IAppender appender)
private static bool IsEasyLoggingAppender(IAppender appender)
{
if (appender.GetType() == typeof(ConsoleAppender))
{
Expand Down

0 comments on commit 193f87e

Please sign in to comment.