Thanks all!  That seems to work using tomcat.conf.

I was hoping to do it similarly in tomcat.conf by adding a section just for 
the CAS logging options instead of appending the properties an already long 
string of options, since the value of "JAVA_OPTS" can grow and get pretty 
long if many options are defined.

Thanks,
Matt

On Thursday, April 28, 2016 at 12:27:20 PM UTC-4, crpeck wrote:
>
> Or, follow these directions:
>
> https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-7-on-centos-7-via-yum
> Which basically says to edit /usr/share/tomcat/conf/tomcat.conf
> -c
>
>
> On Thu, Apr 28, 2016 at 12:12 PM, Dmitriy Kopylenko <[email protected] 
> <javascript:>> wrote:
>
>> Yes that, and also Tomcat SHOULD automatically pick up 
>> $TC_HOME/bin/setenv.sh
>>
>> D.
>>
>> On Apr 28, 2016, at 12:11 PM, Misagh Moayyed <[email protected] 
>> <javascript:>> wrote:
>>
>> startup.sh or catalina.sh will do. 
>>  
>> *From:* [email protected] <javascript:> [mailto:[email protected] 
>> <javascript:>] *On Behalf Of *Matt S.
>> *Sent:* Thursday, April 28, 2016 9:07 AM
>> *To:* CAS Community <[email protected] <javascript:>>
>> *Cc:* [email protected] <javascript:>; [email protected] <javascript:>
>> *Subject:* Re: [cas-user] Externalizing Log4j2 Not Working on Cas 4.2.1
>>  
>> Thanks, Dmitriy.  That makes sense.
>>  
>> The only issue now is that Tomcat doesn't seem to be using the 
>> "setenv.sh" script.  From what I've found, this seems to be because we are 
>> using the tomcat 7 server from the yum repo on Centos 7 as opposed to the 
>> manually downloaded version of the server, so there was no startup scripts 
>> or setenv.sh script, but I tried to create setenv.sh in the Tomcat home/bin 
>> directory.
>>  
>> I haven't found anything yet regarding how to tell Tomcat to use 
>> setenv.sh.  Is there another way to set this in Tomcat?
>>  
>> Thanks,
>> Matt
>>
>> On Thursday, April 28, 2016 at 11:01:53 AM UTC-4, Dmitriy Kopylenko wrote:
>>
>> Yes, as indicated in the doc that Misagh referenced, the 
>> ‘log4j.configurationFile’ is a system level JVM property that is not set in 
>> your cas.properties file. This is the change in 4.2+. You’d need to 
>> explicitly pass this system property to your JVM runtime with -D prefix. 
>> Here’s for example an excerpt from Tomcat server’s (where cas.war is 
>> deployed) setenv.sh that sets those system properties:
>>  
>>
>> *#CAS logging settingsexport JAVA_OPTS="$JAVA_OPTS 
>> -Dlog4j.configurationFile=/etc/cas/log4j2.xml 
>> -DloggerFactory=org.apache.logging.slf4j.Log4jLoggerFactory”*
>>  
>> Best,
>> D.
>>  
>>
>> On Apr 28, 2016, at 10:21 AM, Misagh Moayyed <[email protected]> wrote:
>>  
>> See 
>> http://jasig.github.io/cas/4.2.x/installation/Logging.html#configuration
>>  
>> *From:* [email protected] [mailto:[email protected]] *On Behalf Of *Matt S.
>> *Sent:* Thursday, April 28, 2016 6:13 AM
>> *To:* CAS Community <[email protected]>
>> *Subject:* [cas-user] Externalizing Log4j2 Not Working on Cas 4.2.1
>>  
>> Hi,
>>  
>> On Cas server 4.2.1, it doesn't seem to be using the property in 
>> cas.properties for externalizing the log4j2.xml file.
>>  
>> This was working in 4.1.x, for example setting log4j.config.location=
>> file:///etc/cas/log4j2.xml in an externalized cas.properties file, but 
>> it doesn't seem to be picking it up in 4.2 as none of the log files are 
>> being created.
>>  
>> If I just copy the log4j2.xml into my overlay in WEB-INF/classes/, it 
>> does seem to work, but at least that is expected since it's the default 
>> location.
>>  
>> I also noticed that in the sample Overlay linked in documentation, the 
>> cas.properties file does not contain any property related to the log4j2 
>> file.
>> Is there a different way this is supposed to be setup to externalize?
>>  
>> The logging section of the documentation only mentions a Java virtual 
>> machine argument to define log4j.configurationFile for externalization.
>> I also tried using a property name of "log4j.configurationFile" in 
>> cas.properties but that didn't seem to work.
>>  
>> Any suggestions?
>>  
>>  
>> Thanks,
>> Matt
>> -- 
>> 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 post to this group, send email to [email protected].
>> Visit this group at 
>> https://groups.google.com/a/apereo.org/group/cas-user/.
>> To view this discussion on the web visit 
>> https://groups.google.com/a/apereo.org/d/msgid/cas-user/45ef2ef3-f311-4465-9374-cb746fae89f8%40apereo.org
>>  
>> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/45ef2ef3-f311-4465-9374-cb746fae89f8%40apereo.org?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/a/apereo.org/d/optout.
>>  
>> -- 
>> 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 post to this group, send email to [email protected].
>> Visit this group at 
>> https://groups.google.com/a/apereo.org/group/cas-user/.
>> To view this discussion on the web visit 
>> https://groups.google.com/a/apereo.org/d/msgid/cas-user/3942b8ed.00002ff0.00000026%40MMOAYYED.unicon.net
>>  
>> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/3942b8ed.00002ff0.00000026%40MMOAYYED.unicon.net?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/a/apereo.org/d/optout.
>>
>>  
>>
>> -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected] <javascript:>.
>> Visit this group at 
>> https://groups.google.com/a/apereo.org/group/cas-user/.
>> To view this discussion on the web visit 
>> https://groups.google.com/a/apereo.org/d/msgid/cas-user/a7934b1c-989b-4b08-ab81-bd05c217c0ff%40apereo.org
>>  
>> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/a7934b1c-989b-4b08-ab81-bd05c217c0ff%40apereo.org?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/a/apereo.org/d/optout.
>>
>> -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected] <javascript:>.
>> Visit this group at 
>> https://groups.google.com/a/apereo.org/group/cas-user/.
>> To view this discussion on the web visit 
>> https://groups.google.com/a/apereo.org/d/msgid/cas-user/01ba01d1a168%248fa6f790%24aef4e6b0%24%40unicon.net
>>  
>> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/01ba01d1a168%248fa6f790%24aef4e6b0%24%40unicon.net?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/a/apereo.org/d/optout.
>>
>>
>> -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected] <javascript:>.
>> Visit this group at 
>> https://groups.google.com/a/apereo.org/group/cas-user/.
>> To view this discussion on the web visit 
>> https://groups.google.com/a/apereo.org/d/msgid/cas-user/6AD2AEBD-1D8A-4361-9A6B-60FF049E0A5B%40unicon.net
>>  
>> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/6AD2AEBD-1D8A-4361-9A6B-60FF049E0A5B%40unicon.net?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/a/apereo.org/d/optout.
>>
>
>

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/b3df650e-1c2e-4c4c-a126-69240a806e6e%40apereo.org.
For more options, visit https://groups.google.com/a/apereo.org/d/optout.

Reply via email to