Fork me on GitHub

im getting 5 of these log messages from the cognitect aws-api:

Jul 05, 2021 7:22:53 PM com.amazonaws.auth.profile.internal.BasicProfileConfigLoader loadProfiles
WARNING: Your profile name includes a 'profile ' prefix. This is considered part of the profile name in the Java SDK, so you will need to include this prefix in your profile name when you reference this profile from your Java code.
how can i disable them?


after these messages, i also see another log message on the stderr:

2021-07-05 19:22:54.723:INFO::nREPL-session-c95f0d6e-f1cc-472d-85b4-dcd1d1820ae8: Logging initialized @109640ms to org.eclipse.jetty.util.log.StdErrLog
so it seems this jetty logger is starting after the amazon libs has already sent some logs.


according to , i should be able to just do something like clj -J-Dcom.amazonaws.auth.profile.internal.LEVEL=OFF to suppress these messages, but that didn't work. i also tried to put a on my classpath, but interestingly enough ( "") just returns nil. im working on a minimal repro case now, but if anyone has some pointers to some examples, it would be great.


We are using awscli v2, so we can use single sign on. For that we need to have section names in ~/.aws/config to be prefixed with "profile<space>" and that triggers these warnings.


(It's really painful, because these warnings often totally obscure the useful output...)


After reading the docs of a bunch of logging related libs, this is what worked for me finally: 1. create a file at the same directory level as the deps.edn file. NOT in src/ or whatever dir, which is on the classpath! example content:

java.util.logging.SimpleFormatter.format=[%1$tF %1$tT] [%4$-7s] %3$s: %5$s%6$s%n
2. reference this file via :jvm-opts in deps.edn. eg, here is a map-entry from the :aliases:
  {:extra-paths ["dev"]
   :jvm-opts    [""
and also wire up the jul (`java.util.logging`) to the abstraction layer


I still see a log message, which has a different format, than the one I specified, and I can't suppress it:

(def s3 (aws.api/client {:api :s3}))

2021-07-06 05:28:44.781:INFO::nREPL-session-2b108885-7ed5-4894-bedd-6077fd6b02c0: Logging initialized @12704ms to org.eclipse.jetty.util.log.StdErrLog


actually, this is the line needed in, for suppressing the warnings about the "`profile `" prefix:



managed to suppress the jetty related log message too. took this advice: and added "-Dorg.eclipse.jetty.util.log.announce=false" to the :jvm-opts too.

Drew Verlee17:07:49

@U086D6TBN thanks for sharing, i was curious how to fix that message myself.

👍 4

where would be a good place to put all this info, so more and datomic cloud users can benefit from it?

Drew Verlee07:07:59

The datomic forum maybe? Someone official would say least see it there and meet help redirect. Also it's persistent

👍 3