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:
You must change several lines in the log4j.properties file to enable logging to the ceg4.log file.
- Uncomment first log4j.rootLogger line
- Comment second log4j.rootLogger line
- Uncomment the log4j.appender.fileout lines
- 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.
- Save your changes
After making and saving the above changes, the top of the log4j.properties file will look similar to this:
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:
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.