Skip to content

Commit

Permalink
Changed log level messages for toml configuration file reading
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jmartinezramirez committed Oct 31, 2024
1 parent d3d2c79 commit ca94da5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Snowflake.Data/Core/TomlConnectionBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public string GetConnectionStringFromToml(string connectionName = null)
{
var tomlPath = ResolveConnectionTomlFile();
var connectionToml = GetTomlTableFromConfig(tomlPath, connectionName);
s_logger.Debug($"Reading connection parameters from file using key: {connectionName} and path: {tomlPath}");
s_logger.Info($"Reading connection parameters from file using key: {connectionName} and path: {tomlPath}");
return connectionToml == null ? string.Empty : GetConnectionStringFromTomlTable(connectionToml);
}

Expand Down Expand Up @@ -85,7 +85,7 @@ private void AppendTokenFromFileIfNotGivenExplicitly(TomlTable connectionToml, b
return;
}

s_logger.Debug($"Reading token from file {tokenFilePathValue}");
s_logger.Info($"Trying to load token from file {tokenFilePathValue}");
var token = LoadTokenFromFile(tokenFilePathValue);
if (!string.IsNullOrEmpty(token))
{
Expand All @@ -108,13 +108,13 @@ private string LoadTokenFromFile(string tokenFilePathValue)
{
if (!_fileOperations.Exists(tokenFilePathValue))
{
s_logger.Debug($"Specified file {tokenFilePathValue} does not exists.");
s_logger.Info($"Specified token file {tokenFilePathValue} does not exists.");
throw new SnowflakeDbException(SFError.INVALID_CONNECTION_PARAMETER_VALUE, tokenFilePathValue, "token_file_path");
}

tokenFile = tokenFilePathValue;
}
s_logger.Debug($"Read token from file path: {tokenFile}");
s_logger.Info($"Read token from file path: {tokenFile}");
return _fileOperations.Exists(tokenFile) ? _fileOperations.ReadAllText(tokenFile, ValidateFilePermissions) : null;
}

Expand Down

0 comments on commit ca94da5

Please sign in to comment.