QUICK LINKS

Support
Issue Tracker
[Services]
Questions
[uAchieve 4.5 Applications]
[uAchieve 5.0 Application]
[uAchieve 5.1 Application]
Transferology
TES
[Training & Conferences]
Accessibility

Page tree
Skip to end of metadata
Go to start of metadata

This page identifies the necessary changes in the log4j.properties file for the Connector to log to a file.

You may be wondering why CollegeSource does not provide a Connector distribution that automatically logs to a file, out of the box. We do not attempt to provide this due to application server and operating system differences that lead to subsequent issues, including write permissions, no standard directory location on every server, and difficulty identifying the directory specified by Java for java.io.tmpdir.

As previously indicated, the Tomcat and GlassFish distributions of the Connector include the log4j.properties file. The file is found in the exploded WEB-INF/classes directory.

Schools using OAS must download the log4j.properties file from here:

Configure log4j.properties

You must change several lines in the log4j.properties file to enable logging to the ceg4.log file.

  1. Uncomment first log4j.rootLogger line
  2. Comment second log4j.rootLogger line
  3. Uncomment the log4j.appender.fileout lines
  4. Change the log4j.appender.fileout.File line to be the full path (directories and filename) of the desired log file. Be sure to specify a valid full pathname that exists and that the Java OS process owner has the necessary Read/Write permissions.
  5. Save your changes

After making and saving the above changes, the top of the log4j.properties file will look similar to this:

#ceg-resources
#Uncomment this line to write logging to the console and a file
log4j.rootLogger=INFO, fileout, stdout
#log4j.rootLogger=INFO, stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.threshold=DEBUG
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p %d{HH:mm:ss,SSS} [%c] %m%n

# Uncomment these lines to define the logging file 
log4j.appender.fileout=org.apache.log4j.RollingFileAppender
log4j.appender.fileout.File=/tmp/ceg4.log
log4j.appender.fileout.MaxFileSize=7MB
log4j.appender.fileout.MaxBackupIndex=10
log4j.appender.fileout.layout=org.apache.log4j.PatternLayout
log4j.appender.fileout.layout.ConversionPattern=%5p %d{MM/dd HH:mm:ss,SSS} [/ceg4] [%t] [%c] %m%n

Windows Path?

If installing on a Windows Server, you still need to specify the forward slash (/). An example line for a Windows server looks like the following:

log4j.appender.fileout.File=D:/temp/ceg4.log

Verifying Logging

Depending on your application server and it's configuration, the saved changes to log4j.properties may cause an automatic redeploy. If not, you must either redeploy the Connector or stop/start your application server to cause the configuration to reload and take effect.

  • No labels