diff --git a/src/main/java/us/dot/its/jpo/ode/aws/depositor/AwsDepositor.java b/src/main/java/us/dot/its/jpo/ode/aws/depositor/AwsDepositor.java index 98fe5fc..d85a2d4 100644 --- a/src/main/java/us/dot/its/jpo/ode/aws/depositor/AwsDepositor.java +++ b/src/main/java/us/dot/its/jpo/ode/aws/depositor/AwsDepositor.java @@ -179,6 +179,7 @@ public void run(String[] args) throws Exception { } else if (destination.equals("firehose")) { firehose = buildFirehoseClient(awsRegion); } else if (destination.equals("gcs")) { + // The file path specified by GOOGLE_APPLICATION_CREDENTIALS will be used here. gcsStorage = StorageOptions.getDefaultInstance().getService(); } else { logger.error("Invalid destination: " + destination); @@ -213,8 +214,8 @@ public void run(String[] args) throws Exception { } } catch (Exception e) { int retryTimeout = 5000; - logger.error("Error depositing to AWS. Retrying in " + retryTimeout / 1000 + " seconds", - e); + String destinationName = depositToS3 ? "S3" : destination; + logger.error("Error depositing to destination '" + destinationName + "'. Retrying in " + retryTimeout / 1000 + " seconds", e); Thread.sleep(retryTimeout); } } @@ -226,7 +227,7 @@ public void run(String[] args) throws Exception { } } } catch (Exception e) { - logger.error("Server Error. reconnecting to AWS ", e); + logger.error("Server Error. reconnecting to destination ", e); } finally { stringConsumer.close(); }