1

I am using Apereo CAS 6.2. During startup there are many log messages. I want to disable this specific one:

INFO [org.apereo.cas.configuration.DefaultCasConfigurationPropertiesSourceLocator] - <Configuration files found at [/etc/cas/config] are [[file [/etc/cas/config/cas.properties]]] under profile(s) [[standalone]]>

It could not control it by log4j.xml file like other messages. Property logging.level.org.apereo.cas in cas.properties file also doesn`t affect on this line. Inside the docker container it is saved in the /tmp/logs/cas.log file. How can I turn off that message?

50Cube
  • 11
  • 1
  • how about `logging.level.org.apereo.cas.configuration.DefaultCasConfigurationPropertiesSourceLocator=ERROR', would that works? – Ng Sek Long Jan 03 '21 at 06:02
  • 1
    Unfortunately it does not work. – 50Cube Jan 04 '21 at 09:31
  • Judging from this https://stackoverflow.com/questions/4972954/how-to-disable-loggers-of-a-class-or-of-whole-package, disabling of a class should be possible. Now you evne said that `logging.level.org.apereo.cas` does not work is weird, because I used that in my setup with no issue. Maybe your properties is not loaded correctly? Did you load other properties other than logging.level.org.apearo.cas? – Ng Sek Long Jan 05 '21 at 09:38
  • Other properties are being loaded correctly. Logging.level.org.apereo.cas works but it does not affect this one line. – 50Cube Jan 08 '21 at 08:27
  • Ah I see that you the problem is, the issue comes in that, during the `DefaultCasConfigurationPropertiesSourceLocator` is loaded, cas.properties and other stuff is not yet loaded, so it is impossible to disable this line in `cas.properties`. Can you try do this: create a YAML file in `src/main/resources` called `application.yml`, put this in `logging.level.org.apereo.cas.configuration.DefaultCasConfigurationPropertiesSourceLocator: OFF` in. If still not works, also can try putting it in `bootstrap.yml` file, same folder – Ng Sek Long Jan 08 '21 at 09:30

0 Answers0