m The aws-api is wonderful but kinda noisy upon initial invocations for a client. Here's an example of how to suppress the "Unable to fetch credentials" messages by setting the java.util.logging level to WARNING.
Noisy (default)
clj -X com.grzm.ex.pod-aws/ex
2021-10-30 10:38:02.623:INFO::main: Logging initialized @5482ms to org.eclipse.jetty.util.log.StdErrLog
Oct 30, 2021 10:38:02 AM clojure.tools.logging$eval9763$fn__9766 invoke
INFO: Unable to fetch credentials from environment variables.
Oct 30, 2021 10:38:02 AM clojure.tools.logging$eval9763$fn__9766 invoke
INFO: Unable to fetch credentials from system properties.
(:Buckets :Owner)
(:UserId :Account :Arn)
The aws-api client uses clojure.tools.logging, and falls back to java.util.logging as there is no other logging implementation.
The secret sauce is to specify the java.util.logging config file using
a jvm parameter -Djava.util.logging.config.file=logging.properties
which specifies the config logging level.
clj -A:quiet -X com.grzm.ex.pod-aws/ex
2021-10-30 10:48:31.842:INFO::main: Logging initialized @5090ms to org.eclipse.jetty.util.log.StdErrLog
(:Buckets :Owner)
(:UserId :Account :Arn)
See? Isn't that great? ... Wait. Seriously? What's that Logging initialized
line still doing there? I thought I told you to be quiet?!
clj -A:REALLY:quiet -X com.grzm.ex.pod-aws/ex
(:Buckets :Owner)
(:UserId :Account :Arn)
To get rid of the "Logging initialized, have
jetty-logging.properties
on the class path with
org.eclipse.jetty.util.log.announce = false
.
Crikey.
See deps.edn for details.