Activity Team/FAQ: Difference between revisions

Line 99: Line 99:


:Running the emulator with <code>sugar-emulator -i 832x624 </code> give a close match to the XO screen proportions (e.g., the toolbar will be a close match).
:Running the emulator with <code>sugar-emulator -i 832x624 </code> give a close match to the XO screen proportions (e.g., the toolbar will be a close match).
==== How do I use debugging output and how do I set the debug level? ====
You need to import logging:
import logging
_logger = logging.getLogger('your-activity-name')
and then insert logging statements in your code:
_logger.debug('some debugging output')
_logger.error('some error output')
See http://docs.python.org/library/logging.html for more details.
To set the level of the debugging output that appears in your log file, edit:
~/.sugar/debug
Typically, you will want to uncomment this line:
#export SUGAR_LOGGER_LEVEL=debug
by removing the leading #
export SUGAR_LOGGER_LEVEL=debug
See