use of software.amazon.awssdk.services.s3.model.ListBucketsResponse in project aws-doc-sdk-examples by awsdocs.
the class S3Log method main.
public static void main(String[] args) {
System.out.println("testing logging setup for " + S3Log.class);
Region region = Region.US_WEST_2;
S3Client s3 = S3Client.builder().region(region).build();
ListBucketsRequest listBucketsRequest = ListBucketsRequest.builder().build();
ListBucketsResponse listBucketsResponse = s3.listBuckets(listBucketsRequest);
listBucketsResponse.buckets().stream().forEach(x -> System.out.println(x.name()));
logger.info("logging level info");
logger.debug("logging debug stuff");
logger.warn("logging warning");
logger.error("logging error");
logger.fatal("logging fatal");
}
Aggregations