Skip to end of metadata
Go to start of metadata
Table of Contents

New CAS documentation site


CAS documentation has moved over to, starting with CAS version 4.x. The wiki will no longer be maintained. For the most recent version of the documentation, please refer to the aforementioned link.

CAS provides a logging facility that logs important informational events like authentication success and failure; it can be customized to produce additional information for troubleshooting.

CAS uses the Commons Logging framework as a facade for the log4j engine by default. The default log4j engine can be replaced by any supported by Commons Logging if needed.

log4j Configuration

This section assumes you are using the default log4j engine.

The log4j configuration file is located in ${project.home}/cas-server-webapp/src/main/webapp/WEB-INF/classes/ At deployment time it is located at $CATALINA_HOME/webapps/cas/WEB-INF/classes/ By default logging is set to INFO for ja-sig code and WARN for Spring code. While debugging you may want to set those to DEBUG. When in production though, you probably want to run them both as WARN. Depending on your needs, it may make sense to keep the defaults (INFO and WARN).

In the default configuration, CAS logs to a log4j FileAppender in the current working directory of the java process. If you start/stop your servlet container from a shell, it's very likely the cas.log file will move around depending on the current directory where you start the container, e.g. start for Tomcat. It's strongly recommended that you change the file appender path to an absolute path suitable for your environment such as /var/log/cas.log. A good choice for Tomcat is something like ${catalina.home}/logs/cas.log.

The following is an example of a real-world file used in production at Virginia Tech for CAS server version 3.3.3.

Version-Specific Warning


As of CAS Server 3.4, an XML-based log4j configuration file is used instead of a properties file.

Real-World File

The following log4j.xml configuration file is used in production at Virginia Tech for CAS 3.4.4.

Example CAS 3.4.x log4j Configuration
  • No labels