From ba5b955533c5bd6720ac662ad705fca9de9b9547 Mon Sep 17 00:00:00 2001 From: David Gault Date: Tue, 14 May 2024 10:25:28 +0100 Subject: [PATCH] S3FileSystemStore: Log stack trace rather than printing --- src/loci/formats/S3FileSystemStore.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/loci/formats/S3FileSystemStore.java b/src/loci/formats/S3FileSystemStore.java index c61d2ca..dde2339 100644 --- a/src/loci/formats/S3FileSystemStore.java +++ b/src/loci/formats/S3FileSystemStore.java @@ -105,8 +105,7 @@ private void setupClient() { .withPathStyleAccessEnabled(true) .withCredentials(new AWSStaticCredentialsProvider(new AnonymousAWSCredentials())).build(); } catch (Exception e) { - LOGGER.info("Exception caught while constructing S3 client"); - e.printStackTrace(); + LOGGER.info("Exception caught while constructing S3 client", e); } } @@ -133,8 +132,7 @@ public InputStream getInputStream(String key) throws IOException { S3ObjectInputStream responseStream = o.getObjectContent(); return responseStream; } catch (Exception e) { - LOGGER.info( "Unable to locate or access key: " + key2); - e.printStackTrace(); + LOGGER.info( "Unable to locate or access key: " + key2, e); } return null;