Attaching Sugar logs to tickets: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
No edit summary
 
(19 intermediate revisions by 8 users not shown)
Line 1: Line 1:
If you provide debugging logs to a ticket, you'll be making it much easier to developers to fix the issue.
If you provide debugging logs to a ticket, you'll be making it much easier to developers to fix the issue.

== Enabling debugging ==


These are general steps to follow when providing logs for some bug:
These are general steps to follow when providing logs for some bug:


* Open the terminal activity.
* Start the [[Terminal activity]].
* Type the following:
* Type the following:
echo 'export SUGAR_LOGGER_LEVEL=debug' >> /home/olpc/.xsession
: then press the Enter key


* Reboot, or just restart [[X]] by holding down ctrl+alt+erase
echo 'export SUGAR_LOGGER_LEVEL=debug' >> /home/olpc/.xsession
* Perform the minimal steps to reproduce the bug.
* From a terminal window, type:
sudo olpc-log


* It places all relevant logs into a file in the current directory. The name of the file includes the serial number of the laptop and the date and time the log was generated. Please send this log when reporting the problem.
* Reboot
* [[Log]] is an activity for viewing log files
* Do the minimal steps to reproduce the bug.
* '''The relevant logs are in /home/olpc/.sugar/default/logs''', copy them to an usb stick and attach to the ticket from some other computer.
''''' The file datastore.log may contain a list of all the files in your USB stick or SD card. Check and delete from there if you don't want to submit that information. Most probably it's not needed by the developers. '''''
* Another interesting file to attach to the ticket is /var/log/messages.
* You may also use <code>olpc-netlog</code> to gather all logs and XO info to a single file.


=== Other debugging settings ===
If your bug involves the presence service, you might also want to follow the [[Telepathy-debug|steps outlined for debugging Telepathy]].
The file <tt>/home/olpc/.xsession-example</tt> contains other settings useful for debugging. If you have created a <tt>/home/olpc/.xsession</tt> then you can copy individual lines from this. Or you can copy the entire file to <tt>/home/olpc/.xsession</tt>, edit the file, and uncomment the log settings you want to enable.
* In a Terminal Activity:
cp /home/olpc/.xsession-example /home/olpc/.xsession
nano /home/olpc/.xsession
''remove the "#" symbol from the start of the DEBUG settings you want to enable.
* save the file (press ctrl+X)
* restart the X Window System as above

=== Presence / Collaboration ===

If your bug involves presence (who you can see in Neighborhood View) or collaboration (activity sharing), please also follow the steps for [[Telepathy debugging]].

== Other logs ==
Several [[Linux]] subsystems create log files in the directory <tt>/var/log/</tt>.
The [[Log]] activity lists some of these.
You may need to become the [[root]] user to view some log files in the [[Terminal activity]].


== If you can't reproduce the bug ==
== If you can't reproduce the bug ==


Python-based activities automatically make logs in /home/olpc/.sugar/default/logs. These logs seem to be moved into subfolders on restart and deleted after a certain period of time. The python stack trace is recorded here on crashes. This is also a good thing to attach to a bug. As above, you will have to use the terminal activity to copy them to a removable memory (SD or USB) before using the XO or another computer to attach them to the bug.
[[Python]]-based activities automatically make logs in <tt>/home/olpc/.sugar/default/logs</tt>. These logs seem to be moved into subfolders on restart and deleted after a certain period of time. If the activity crashed, the Python stack trace will be in its log. This is also a good thing to attach to a bug. As above, you will have to use the [[Terminal activity]] to copy them to removable memory (SD card or USB flash drive) before using the XO or another computer to attach them to the bug.


[[category:Developers]] [[category:software]]
[[Category:Preparing for testing]]

Latest revision as of 05:26, 4 September 2009

If you provide debugging logs to a ticket, you'll be making it much easier to developers to fix the issue.

Enabling debugging

These are general steps to follow when providing logs for some bug:

 echo 'export SUGAR_LOGGER_LEVEL=debug' >> /home/olpc/.xsession
then press the Enter key
  • Reboot, or just restart X by holding down ctrl+alt+erase
  • Perform the minimal steps to reproduce the bug.
  • From a terminal window, type:
 sudo olpc-log
  • It places all relevant logs into a file in the current directory. The name of the file includes the serial number of the laptop and the date and time the log was generated. Please send this log when reporting the problem.
  • Log is an activity for viewing log files

Other debugging settings

The file /home/olpc/.xsession-example contains other settings useful for debugging. If you have created a /home/olpc/.xsession then you can copy individual lines from this. Or you can copy the entire file to /home/olpc/.xsession, edit the file, and uncomment the log settings you want to enable.

  • In a Terminal Activity:
 cp /home/olpc/.xsession-example /home/olpc/.xsession
 nano /home/olpc/.xsession
 remove the "#" symbol from the start of the DEBUG settings you want to enable.
  • save the file (press ctrl+X)
  • restart the X Window System as above

Presence / Collaboration

If your bug involves presence (who you can see in Neighborhood View) or collaboration (activity sharing), please also follow the steps for Telepathy debugging.

Other logs

Several Linux subsystems create log files in the directory /var/log/. The Log activity lists some of these. You may need to become the root user to view some log files in the Terminal activity.

If you can't reproduce the bug

Python-based activities automatically make logs in /home/olpc/.sugar/default/logs. These logs seem to be moved into subfolders on restart and deleted after a certain period of time. If the activity crashed, the Python stack trace will be in its log. This is also a good thing to attach to a bug. As above, you will have to use the Terminal activity to copy them to removable memory (SD card or USB flash drive) before using the XO or another computer to attach them to the bug.