Reporting Problems and Creating DEBUG Logs

Reporting Problems

If you are trying to report a problem with LAMS on the LAMS Community, then please take 5 minutes to read these instructions. It looks like a lot to read, but a lot of it is step by step instructions so its not that bad.

The more detail you can give us about the problem, the faster we can suggest a solution.

  • Please tell us the following:
    • which version of LAMS you are running (LAMS 2.0, 2.0.2, etc);
    • if you are using Moodle, Sakai or some other LMS integrated with LAMS then the name and the version of the LMS;
    • what operating system are you using (Windows, Linux, etc).
  • If the problem is with the layout on the screen, or bad wording or something else screen related (e.g. LAMS is configured to run in Greek, but half of the screen appears in English or a Javascript error occurs stopping the screen loading), then can you please:
    • Attach a screen dump to your post. Then we will know exactly which screen you are talking about.
    • Tell us which browser you are using and the version (Firefox 2.0, IE 7.0, etc).
    • Tell us which version of the Flash player you have installed. To work out which version of the Flash player, go to the browser in which the problem occurred and go to http://www.macromedia.com/software/flash/about/ . This will take you to the Adobe website and the version number (e.g. 9,0,28,0) is in the Version Information box towards the top of the screen. You must do it in the browser that had the problem - if you have Firefox and IE on your PC and you get the error in Firefox, don't try to get the version number in IE.
  • If you get a "horrible" error like the following, please put the first few lines of the error in your message, and then attach the LAMS server logs. If you have time to create the DEBUG version of the logs, then that will give us extra details. See "Creating the DEBUG Logs" below for how to create the logs. If you don't have time to create the DEBUG version, or you can't reproduce the problem, please send us the log files that already exist (see "Which Files To Send?") as the complete error is normally written to the logs. Put the logs in a zip file and attach them to the post.
Do not try to paste large bits of text from the logs straight into a message on the community website. This sometimes causes the server to have problems, and the LAMS teams won't get a email to say you have left a message on the community. So it will take longer for us to realise that you have a problem!

Attaching More Than One File To A Post

When you post a message on the LAMS Community, there is an option "Attach?" at the bottom of the page. Select  "Yes" and then when you click "Post" it will ask you attach the file.

But what if you want to attach more than one file? The trick is to click "Post" and upload one file as usual. When you get to the screen after the attachment screen (ie once the file is uploaded), click the back button in your browser and you will go back to the upload screen. You should be able to upload another file. You can keep attaching and hitting back multiple times.

Creating the DEBUG Logs

Turning On DEBUG

When you run the installer, the logging level is automatically set to INFO. To change the level of logging, do the following:

  • Log onto the computer running LAMS and go to the directory <jboss>/server/default/conf/
  • Copy the file log4j.xml to log4j.xml.original
  • Edit the file log4j.xml. This is an XML file, but it can be edited in any text editor, such as Notepad.
  • Find the following entry and change the "INFO" to "DEBUG":

Original entry:

<appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
    <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
    <param name="File" value="${jboss.server.home.dir}/log/server.log"/>
    <param name="Append" value="false"/>
    <param name="Threshold" value="INFO"/>              <--- Change this line
    ....
    </layout>
  </appender>

New entry:

<appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
    <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
    <param name="File" value="${jboss.server.home.dir}/log/server.log"/>
    <param name="Append" value="false"/>
    <param name="Threshold" value="DEBUG"/>
    ....
    </layout>
  </appender>
  • Find the following entry and change the "INFO" to "DEBUG"

Original entry:

<category name="org.lamsfoundation.lams" additivity="false">
    <priority value="INFO"/>                        <--- Change this line
    <appender-ref ref="LAMSFILE"/>
    <appender-ref ref="LAMSCONSOLE"/>
  </category>

New entry:

<category name="org.lamsfoundation.lams" additivity="false">
    <priority value="DEBUG"/>
    <appender-ref ref="LAMSFILE"/>
    <appender-ref ref="LAMSCONSOLE"/>
  </category>
  • If LAMS is already running, then stop and restart LAMS or wait about 15 minutes. LAMS will pick up the change automatically after sometime but we can't tell you exactly how long to wait. So if you want to know that the change completed and create your log files, then stopping and restarting LAMS will make it update immediately. But if it is inconvenient to restart LAMS (as classes are running using LAMS) then if you wait for a while the change will take affect.

How do you know if the change has worked? Have a look at the file <jboss>/server/default/log/lams.log. If you see entries with the word "DEBUG" in the third column, then the change has worked and the debugging messages are being written to the log.

For example:

14:57:01,515 [http-0.0.0.0-8080-3:] DEBUG org.lamsfoundation.lams.integration.security.SingleSignOn - Process request for '/lams/index.jsp'
14:57:01,515 [http-0.0.0.0-8080-3:] DEBUG org.lamsfoundation.lams.integration.security.SingleSignOn -  Checking for SSO cookie
14:57:01,515 [http-0.0.0.0-8080-3:] DEBUG org.lamsfoundation.lams.web.filter.LocaleFilter - Locale set from server is en,AU

Which Files To Send?

Once debugging is turned on, please make the problem happen again. ie do whatever it was you have reported as a problem. Then go back to the <jboss>/server/default/log/ and then send us all the files in that directory that have been changed today. This should include the following files:

  • audit.log.<today's date>
  • server.log
  • hibernatelams.log and maybe hibernatelams.log.<some number>
  • lams.log and maybe lams.log.<some number>
  • localhost_access_log.<today's date>.log

Why maybe lams.log.<some number> and hibernatelams.log.<some number>? If these logs get very long, then they start another log file and make the old one .1, .2, etc. That's why we only want today's files - the maybe a hibernatelams.log.7 still there from three weeks ago and that won't be any help. But a hibernatelams.log.1 that was created today may be helpful to sort out the problem.

If the problem relates to the Moodle integration then include Moodle's Apache log (from the Apache directory).

Please zip up the log files before sending as they can be very big.

Turning Off DEBUG

Once you have created the logs and posted them on the LAMS Community, or emailed them to whoever is doing your support, then you want to turn off the debugging again as it can slow down your LAMS server. If this is a bug that is difficult to reproduce, you can leave it in DEBUG mode until you have been able to reproduce the problem but on a large production system  you should not run in DEBUG for any longer than you have to.

To put it back to the original settings:

  • Log onto the computer running LAMS and go to the directory <jboss>/server/default/conf/
  • Copy the file log4j.xml to log4j.xml.debug. If you keep the debug version then you will have it ready for next time.
  • Copy the file log4j.xml.original to log4j.xml. (You should have created the log4j.xml.original file when you changed the server to DEBUG level).
  • Either restart your LAMS server or just let LAMS pick up the changes automatically in the next ten minutes or so.
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.