Skip to content

Commit

Permalink
SNOW-990111: Move where logging is executed
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-ext-simba-lf committed Feb 2, 2024
1 parent 1c0babc commit dd824e6
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions Snowflake.Data/Core/Session/EasyLoggingStarter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,20 @@ internal EasyLoggingStarter()

public virtual void Init(string configFilePathFromConnectionString)
{
if (string.IsNullOrEmpty(configFilePathFromConnectionString))
{
s_logger.Info($"Attempting to enable easy logging without a config file specified from connection string");
}
else
{
s_logger.Info($"Attempting to enable easy logging using config file specified from connection string: {configFilePathFromConnectionString}");
}

lock (_lockForExclusiveInit)
{
if (!AllowedToInitialize(configFilePathFromConnectionString))
{
return;
}
if (string.IsNullOrEmpty(configFilePathFromConnectionString))
{
s_logger.Info($"Attempting to enable easy logging without a config file specified from connection string");
}
else
{
s_logger.Info($"Attempting to enable easy logging using config file specified from connection string: {configFilePathFromConnectionString}");
}
var config = _easyLoggingConfigProvider.ProvideConfig(configFilePathFromConnectionString);
if (config == null)
{
Expand Down

0 comments on commit dd824e6

Please sign in to comment.