Mark,
Logging config is loaded as part of the application initialization (container
handles this part). Cas properties file is loaded after that during application
runtime (spring classes do this work).
Command line parameters can be placed in a start up script. For tomcat that is
bin/setenv.sh.
Ray
On Fri, 2021-04-16 at 02:21 -0700, Mark van Rossum wrote:
Notice: This message was sent from outside the University of Victoria email
system. Please be cautious with links and sensitive information.
Hi,
I'm using the default cas-overlay template which includes a log4j2.xml config
file. This has a value: " <Property name="cas.log.level">info</Property>"
which can be altered to set the main logging level.
I have all other settings in cas.properties, and then multiple environments
(dev,preprod,prod) etc using their own property files which overlay the
cas.properties with environment specific values
I'd like to keep the log4j XML file common across all my environments, but set
the log level differently per environment, using the property files.
I tried setting "cas.log.level" in the property file but this just errored:
"Failed to bind properties under 'cas' to
org.apereo.cas.configuration.CasConfigurationProperties
cas.log.level = TRACE"
Weirdly it seems you can set this property on the command line with
"-Dcas.log.level" though, but I'd prefer to keep all environment specific
settings in it's property file as it makes configuration much simpler.
It seems like a common thing to do, is there anyway to set this value using the
property files? The documentation [1] notes you can set "logging.level=" in
the property files, but you would then need to duplicate all the loggers from
the log4j XML file which.
Thanks!
Mark
[1] https://apereo.github.io/cas/development/logging/Logging.html
--
Ray Bon
Programmer Analyst
Development Services, University Systems
2507218831 | CLE 019 | [email protected]<mailto:[email protected]>
I respectfully acknowledge that my place of work is located within the
ancestral, traditional and unceded territory of the Songhees, Esquimalt and
WSÁNEĆ Nations.
--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/12558666fa218e7f6bad7ed6a1dd7260f1b135cc.camel%40uvic.ca.