I couldn’t find anything explaining this, so I thought I’d share it. In jBoss, the default configuration of CAS 3.3.1 makes its log entries to the jBoss logs as follows:
2009-10-28 03:19:07,621 INFO [STDOUT] 2009-10-28 03:19:07,590 INFO [org.jasig.cas.ticket.registry.support.DefaultTicketRegistryCleaner] - <Starting cleaning of expired tickets from ticket registry at [Wed Oct 28 03:19:07 CDT 2009]> 2009-10-28 03:19:08,106 INFO [STDOUT] 2009-10-28 03:19:08,106 INFO [org.jasig.cas.ticket.registry.support.DefaultTicketRegistryCleaner] - <0 found to be removed. Removing now.> 2009-10-28 03:19:08,106 INFO [STDOUT] 2009-10-28 03:19:08,106 INFO [org.jasig.cas.ticket.registry.support.DefaultTicketRegistryCleaner] - <Finished cleaning of expired tickets from ticket registry at [Wed Oct 28 03:19:08 CDT 2009]> INFO inside STDOUT inside INFO… annoying at least. And you have to find log4j.properties in WEB-INF/classes if you want to tweak what gets logged. After much banging my head against the wall I finally figured out how to make CAS use jBoss’ log: a) Remove or rename CAS’ WEB-INF/classes/log4j.properties to something that won’t be read. b) In web.xml comment out Log4jConfigListener. c) In web.xml comment out log4jConfigLocation and log4jExposeWebAppRoot. d) Remove or rename WEB-INF/lib/log4j*.jar to a non-jar extension so that jBoss’ customized log4j can take over. Bingo! The log entries now look normal, and you can tweak what gets logged in jBoss’ conf/jboss-log4j.xml -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
