Difference between revisions of "BugSquad/Get Logs"

From Sugar Labs
Jump to navigation Jump to search
m (moved Walter is a wanker 7/Get Logs to BugSquad/Get Logs over redirect: revert)
Line 1: Line 1:
<noinclude>{{ GoogleTrans-en | es =show | bg =show | zh-CN =show | zh-TW =show | hr =show | cs =show | da =show | nl =show | fi =show | fr =show | de =show | el =show | hi =show | it =show | ja =show | ko =show | no =show | pl =show | pt =show | ro =show | ru =show | sv =show }}</noinclude>
+
<noinclude>{{TOCright}}
{{TOCright}}
+
[[Category:Testing]]
 +
[[Category:BugSquad]]
 +
[[Category:HowTo]]
 +
</noinclude>
 +
 
  
 
== What are the logs useful for ==
 
== What are the logs useful for ==
 
If you provide debugging logs to a ticket, you'll be making it much easier to developers to fix the issue. In most of the cases it will be easiest for you to reproduce the bug.
 
If you provide debugging logs to a ticket, you'll be making it much easier to developers to fix the issue. In most of the cases it will be easiest for you to reproduce the bug.
 +
 +
== The Log Activity ==
 +
 +
The [[olpc:Log]] Activity, [{{fullurle:olpc:File:Activity-log.svg}} http://wiki.laptop.org/images/b/b5/Activity-log.svg][[Image:olpc:File:Activity-log.svg|link=olpc:Log]] is a Sugar-based log viewer that is in most distributions to help you view software logs. You can copy text from the view pane into the Sugar clipboard, then from the clipboard keep it into the Journal, and then attach that Journal item into the [http://bugs.sugarlabs.org bugs.sugarlabs.org] or [http://dev.laptop.org dev.laptop.org] [Attach file] > [Browse...] dialogs, or paste relevant pieces directly into the bug description.
  
 
== Enabling Sugar debug logging ==
 
== Enabling Sugar debug logging ==
In the latest 0.83 development releases (that will lead to 0.84) we created the file text file ~/.sugar/debug which gets read at sugar startup.  
+
Starting with the 0.83 development release, we created the text file, ~/.sugar/debug (shown in the gray box below), which gets read at sugar startup. All the logging options are commented out by default. Use your editor of choice and remove the '#' before the line 'export SUGAR_LOGGER_LEVEL=debug' to enable Sugar debug logging.
All the logging options are commented by default. Use your editor of choice and remove the '#' before the line 'export SUGAR_LOGGER_LEVEL=debug' to enable Sugar debug logging.  
+
<pre>
 +
# Uncomment the following lines to turn on many sugar debugging
 +
# log files and features
 +
#export LM_DEBUG=net
 +
#export GABBLE_DEBUG=all
 +
#export GABBLE_LOGFILE=$HOME/.sugar/default/logs/telepathy-gabble.log
 +
#export SALUT_DEBUG=all
 +
#export SALUT_LOGFILE=$HOME/.sugar/default/logs/telepathy-salut.log
 +
#export GIBBER_DEBUG=all
 +
#export PRESENCESERVICE_DEBUG=1
 +
#export SUGAR_LOGGER_LEVEL=debug
 +
 
 +
# Uncomment the following line to enable core dumps
 +
#ulimit -c unlimited
 +
</pre>
  
 
=== Where are the logs placed ===
 
=== Where are the logs placed ===
 
* Perform the minimal steps to reproduce the bug.
 
* Perform the minimal steps to reproduce the bug.
* The relevant logs are in '~/.sugar/default/logs', (e.g org.laptop.WebActivity-1.log for the log of the first Browse instance).
+
* The relevant logs are stored in '~/.sugar/default/logs', (e.g, org.laptop.WebActivity-1.log for the log of the first Browse instance).
  
 
=== Using the sugar-emulator ===
 
=== Using the sugar-emulator ===
If you are using a version older than the latest development release (0.83) run the emulator with the following command:
+
If you are using a version older than the development release 0.83, run the emulator with the following command:
 
  SUGAR_LOGGER_LEVEL=debug sugar-emulator
 
  SUGAR_LOGGER_LEVEL=debug sugar-emulator
  
Line 20: Line 42:
 
If your bug involves the presence service, you might also want to follow the steps for [[BugSquad/Telepathy Debugging]].
 
If your bug involves the presence service, you might also want to follow the steps for [[BugSquad/Telepathy Debugging]].
  
== On the XO (using Sugar 0.82.x)==
+
== On the XO-1 (using Sugar 0.82.x)==
These are general steps to follow when providing logs for some bug:
+
These are general steps to follow when providing logs for a bug:
  
 
* Start the Terminal activity.
 
* Start the Terminal activity.
Line 44: Line 66:
 
Another useful command is:
 
Another useful command is:
 
  <code>dmesg</code>  
 
  <code>dmesg</code>  
It prints out all of the kernel's messages and warnings for this session, with any new stuff at the end.  
+
It prints out all of the kernel's messages and warnings for this session, with any new stuff at the end.
 
 
[[Category:BugSquad]]
 
[[Category:HowTo]]
 

Revision as of 13:27, 1 April 2010


What are the logs useful for

If you provide debugging logs to a ticket, you'll be making it much easier to developers to fix the issue. In most of the cases it will be easiest for you to reproduce the bug.

The Log Activity

The olpc:Log Activity, http://wiki.laptop.org/images/b/b5/Activity-log.svgFile:Olpc:File:Activity-log.svg is a Sugar-based log viewer that is in most distributions to help you view software logs. You can copy text from the view pane into the Sugar clipboard, then from the clipboard keep it into the Journal, and then attach that Journal item into the bugs.sugarlabs.org or dev.laptop.org [Attach file] > [Browse...] dialogs, or paste relevant pieces directly into the bug description.

Enabling Sugar debug logging

Starting with the 0.83 development release, we created the text file, ~/.sugar/debug (shown in the gray box below), which gets read at sugar startup. All the logging options are commented out by default. Use your editor of choice and remove the '#' before the line 'export SUGAR_LOGGER_LEVEL=debug' to enable Sugar debug logging.

# Uncomment the following lines to turn on many sugar debugging
# log files and features
#export LM_DEBUG=net
#export GABBLE_DEBUG=all
#export GABBLE_LOGFILE=$HOME/.sugar/default/logs/telepathy-gabble.log
#export SALUT_DEBUG=all
#export SALUT_LOGFILE=$HOME/.sugar/default/logs/telepathy-salut.log
#export GIBBER_DEBUG=all
#export PRESENCESERVICE_DEBUG=1
#export SUGAR_LOGGER_LEVEL=debug

# Uncomment the following line to enable core dumps
#ulimit -c unlimited

Where are the logs placed

  • Perform the minimal steps to reproduce the bug.
  • The relevant logs are stored in '~/.sugar/default/logs', (e.g, org.laptop.WebActivity-1.log for the log of the first Browse instance).

Using the sugar-emulator

If you are using a version older than the development release 0.83, run the emulator with the following command:

SUGAR_LOGGER_LEVEL=debug sugar-emulator

Presence service

If your bug involves the presence service, you might also want to follow the steps for BugSquad/Telepathy Debugging.

On the XO-1 (using Sugar 0.82.x)

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

  • Start the Terminal activity.
  • Type the following:
 echo 'export SUGAR_LOGGER_LEVEL=debug' >> /home/olpc/.xsession
  • Reboot, or just restart X using ctrl+alt+erase

The file ~/.xsession-example contains other settings useful for debugging. You can copy individual lines from this or copy the entire file to ~/.xsession.

On other machines (Sugar.84)

Sugar activities have logs

~/.sugar/default/logs/  

so go to

someuser

type

 ls -al 

then drill down to

 ~/.sugar/default/logs/

for the error messages.

Another useful command is:

dmesg 

It prints out all of the kernel's messages and warnings for this session, with any new stuff at the end.