diff --git a/src/main/java/net/snowflake/client/config/SFClientConfigParser.java b/src/main/java/net/snowflake/client/config/SFClientConfigParser.java index e2e50c883..9d93aed0a 100644 --- a/src/main/java/net/snowflake/client/config/SFClientConfigParser.java +++ b/src/main/java/net/snowflake/client/config/SFClientConfigParser.java @@ -37,31 +37,31 @@ public class SFClientConfigParser { */ public static SFClientConfig loadSFClientConfig(String configFilePath) throws IOException { if (configFilePath != null) { - logger.debug("Attempting to enable easy logging with file path {}", configFilePath); + logger.info("Attempting to enable easy logging with file path {}", configFilePath); } String derivedConfigFilePath = null; if (configFilePath != null && !configFilePath.isEmpty()) { // 1. Try to read the file at configFilePath. - logger.debug("Using config file specified from connection string: {}", configFilePath); + logger.info("Using config file specified from connection string: {}", configFilePath); derivedConfigFilePath = configFilePath; } else if (System.getenv().containsKey(SF_CLIENT_CONFIG_ENV_NAME)) { // 2. If SF_CLIENT_CONFIG_ENV_NAME is set, read from env. String filePath = systemGetEnv(SF_CLIENT_CONFIG_ENV_NAME); - logger.debug("Using config file specified from environment variable: {}", filePath); + logger.info("Using config file specified from environment variable: {}", filePath); derivedConfigFilePath = filePath; } else { // 3. Read SF_CLIENT_CONFIG_FILE_NAME from where jdbc jar is loaded. String driverLocation = Paths.get(getConfigFilePathFromJDBCJarLocation(), SF_CLIENT_CONFIG_FILE_NAME).toString(); if (Files.exists(Paths.get(driverLocation))) { - logger.debug("Using config file specified from driver directory: {}", driverLocation); + logger.info("Using config file specified from driver directory: {}", driverLocation); derivedConfigFilePath = driverLocation; } else { // 4. Read SF_CLIENT_CONFIG_FILE_NAME if it is present in user home directory. String userHomeFilePath = Paths.get(systemGetProperty("user.home"), SF_CLIENT_CONFIG_FILE_NAME).toString(); if (Files.exists(Paths.get(userHomeFilePath))) { - logger.debug("Using config file specified from home directory: {}", userHomeFilePath); + logger.info("Using config file specified from home directory: {}", userHomeFilePath); derivedConfigFilePath = userHomeFilePath; } } diff --git a/src/main/java/net/snowflake/client/core/FileUtil.java b/src/main/java/net/snowflake/client/core/FileUtil.java index 0e12ec4aa..3ae68909b 100644 --- a/src/main/java/net/snowflake/client/core/FileUtil.java +++ b/src/main/java/net/snowflake/client/core/FileUtil.java @@ -21,7 +21,7 @@ public class FileUtil { Arrays.asList(PosixFilePermission.GROUP_READ, PosixFilePermission.OTHERS_READ); public static void logFileUsage(Path filePath, String context, boolean logReadAccess) { - logger.debug("{}Accessing file: {}", getContextStr(context), filePath); + logger.info("{}Accessing file: {}", getContextStr(context), filePath); logWarnWhenAccessibleByOthers(filePath, context, logReadAccess); } diff --git a/src/main/java/net/snowflake/client/core/SFBaseSession.java b/src/main/java/net/snowflake/client/core/SFBaseSession.java index 9d1a09be1..a7b374fde 100644 --- a/src/main/java/net/snowflake/client/core/SFBaseSession.java +++ b/src/main/java/net/snowflake/client/core/SFBaseSession.java @@ -675,7 +675,7 @@ public HttpClientSettingsKey getHttpClientKey() throws SnowflakeSQLException { private void logHttpClientInitInfo(HttpClientSettingsKey key) { if (key.usesProxy()) { - logger.debug( + logger.info( "Driver OCSP mode: {}, gzip disabled: {}, proxy protocol: {}," + " proxy host: {}, proxy port: {}, non proxy hosts: {}, proxy user: {}, proxy password is {}", key.getOcspMode(), diff --git a/src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeAzureClient.java b/src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeAzureClient.java index 401dea8ec..6e57d3965 100644 --- a/src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeAzureClient.java +++ b/src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeAzureClient.java @@ -374,7 +374,7 @@ public void download( EncryptionProvider.decrypt(localFile, key, iv, this.encMat); stopwatch.stop(); long decryptMillis = stopwatch.elapsedMillis(); - logger.debug( + logger.info( "Azure file {} downloaded to {}. It took {} ms (download: {} ms, decryption: {} ms) with {} retries", remoteStorageLocation, localFile.getAbsolutePath(), @@ -387,7 +387,7 @@ public void download( throw ex; } } else { - logger.debug( + logger.info( "Azure file {} downloaded to {}. It took {} ms with {} retries", remoteStorageLocation, localFile.getAbsolutePath(), @@ -472,7 +472,7 @@ public InputStream downloadToStream( InputStream is = EncryptionProvider.decryptStream(stream, key, iv, encMat); stopwatch.stop(); long decryptMillis = stopwatch.elapsedMillis(); - logger.debug( + logger.info( "Azure file {} downloaded to input stream. It took {} ms " + "(download: {} ms, decryption: {} ms) with {} retries", stageFilePath, @@ -488,7 +488,7 @@ public InputStream downloadToStream( } } else { - logger.debug( + logger.info( "Azure file {} downloaded to input stream. Download took {} ms with {} retries", stageFilePath, downloadMillis, @@ -544,7 +544,7 @@ public void upload( String presignedUrl, String queryId) throws SnowflakeSQLException { - logger.debug( + logger.info( StorageHelper.getStartUploadLog( "Azure", uploadFromStream, inputStream, fileBackedOutputStream, srcFile, destFileName)); final List toClose = new ArrayList<>(); @@ -589,13 +589,13 @@ public void upload( stopwatch.stop(); if (uploadFromStream) { - logger.debug( + logger.info( "Uploaded data from input stream to Azure location: {}. It took {} ms with {} retries", remoteStorageLocation, stopwatch.elapsedMillis(), retryCount); } else { - logger.debug( + logger.info( "Uploaded file {} to Azure location: {}. It took {} ms with {} retries", srcFile.getAbsolutePath(), remoteStorageLocation, diff --git a/src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeGCSClient.java b/src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeGCSClient.java index 40e359549..ccf76388d 100644 --- a/src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeGCSClient.java +++ b/src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeGCSClient.java @@ -388,7 +388,7 @@ public void download( EncryptionProvider.decrypt(localFile, key, iv, this.encMat); stopwatch.stop(); long decryptMillis = stopwatch.elapsedMillis(); - logger.debug( + logger.info( "GCS file {} downloaded to {}. It took {} ms (download: {} ms, decryption: {} ms) with {} retries", stageFilePath, localFile.getAbsolutePath(), @@ -406,7 +406,7 @@ public void download( "Cannot decrypt file"); } } else { - logger.debug( + logger.info( "GCS file {} downloaded to {}. It took {} ms with {} retries", stageFilePath, localFile.getAbsolutePath(), @@ -565,7 +565,7 @@ public InputStream downloadToStream( inputStream = EncryptionProvider.decryptStream(inputStream, key, iv, this.encMat); stopwatch.stop(); long decryptMillis = stopwatch.elapsedMillis(); - logger.debug( + logger.info( "GCS file {} downloaded to stream. It took {} ms (download: {} ms, decryption: {} ms) with {} retries", stageFilePath, downloadMillis + decryptMillis, @@ -584,7 +584,7 @@ public InputStream downloadToStream( "Cannot decrypt file"); } } else { - logger.debug( + logger.info( "GCS file {} downloaded to stream. Download took {} ms with {} retries", stageFilePath, downloadMillis, @@ -640,7 +640,7 @@ public void uploadWithPresignedUrlWithoutConnection( String presignedUrl, String queryId) throws SnowflakeSQLException { - logger.debug( + logger.info( StorageHelper.getStartUploadLog( "GCS", uploadFromStream, inputStream, fileBackedOutputStream, srcFile, destFileName)); final List toClose = new ArrayList<>(); @@ -690,12 +690,12 @@ public void uploadWithPresignedUrlWithoutConnection( stopwatch.stop(); if (uploadFromStream) { - logger.debug( + logger.info( "Uploaded data from input stream to GCS location: {}. It took {} ms", remoteStorageLocation, stopwatch.elapsedMillis()); } else { - logger.debug( + logger.info( "Uploaded file {} to GCS location: {}. It took {} ms", srcFile.getAbsolutePath(), remoteStorageLocation, @@ -742,7 +742,7 @@ public void upload( String presignedUrl, String queryId) throws SnowflakeSQLException { - logger.debug( + logger.info( StorageHelper.getStartUploadLog( "GCS", uploadFromStream, inputStream, fileBackedOutputStream, srcFile, destFileName)); final List toClose = new ArrayList<>(); @@ -780,12 +780,12 @@ public void upload( stopwatch.stop(); logger.debug("Upload successful", false); if (uploadFromStream) { - logger.debug( + logger.info( "Uploaded data from input stream to GCS location: {}. It took {} ms", remoteStorageLocation, stopwatch.elapsedMillis()); } else { - logger.debug( + logger.info( "Uploaded file {} to GCS location: {}. It took {} ms", srcFile.getAbsolutePath(), remoteStorageLocation, @@ -817,12 +817,12 @@ public void upload( stopwatch.stop(); logger.debug("Upload successful", false); if (uploadFromStream) { - logger.debug( + logger.info( "Uploaded data from input stream to GCS location: {}. It took {} ms", remoteStorageLocation, stopwatch.elapsedMillis()); } else { - logger.debug( + logger.info( "Uploaded file {} to GCS location: {}. It took {} ms", srcFile.getAbsolutePath(), remoteStorageLocation, diff --git a/src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeS3Client.java b/src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeS3Client.java index e6bc9a11c..ba0664c90 100644 --- a/src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeS3Client.java +++ b/src/main/java/net/snowflake/client/jdbc/cloud/storage/SnowflakeS3Client.java @@ -407,7 +407,7 @@ public ExecutorService newExecutor() { EncryptionProvider.decrypt(localFile, key, iv, this.encMat); stopwatch.stop(); long decryptMillis = stopwatch.elapsedMillis(); - logger.debug( + logger.info( "S3 file {} downloaded to {}. It took {} ms (download: {} ms, decryption: {} ms) with {} retries", stageFilePath, localFile.getAbsolutePath(), @@ -420,7 +420,7 @@ public ExecutorService newExecutor() { throw ex; } } else { - logger.debug( + logger.info( "S3 file {} downloaded to {}. It took {} ms with {} retries", stageFilePath, localFile.getAbsolutePath(), @@ -574,7 +574,7 @@ public void upload( String presignedUrl, String queryId) throws SnowflakeSQLException { - logger.debug( + logger.info( StorageHelper.getStartUploadLog( "S3", uploadFromStream, inputStream, fileBackedOutputStream, srcFile, destFileName)); @@ -649,13 +649,13 @@ public ExecutorService newExecutor() { } if (uploadFromStream) { - logger.debug( + logger.info( "Uploaded data from input stream to S3 location: {}. It took {} ms with {} retries", destFileName, uploadMillis, retryCount); } else { - logger.debug( + logger.info( "Uploaded file {} to S3 location: {}. It took {} ms with {} retries", srcFile.getAbsolutePath(), destFileName,