Question about logging behavior

Faisal Anwar fanwar at
Mon Jun 16 14:04:10 EDT 2008


I'm trying to do simple logging for an activity, but am finding some strange
behavior with logging that I'm hoping someone can clarify for me. In
particular, I've written code similar to the following:

import logging
_logger = logging.getLogger('Annotate')

class MyActivity(activity.Activity):

    def __init__(self, handle):
        activity.Activity.__init__(self, handle)
        _logger.debug('starting myactivity')

Now, when I start my activity up, I don't find any logs that are written to
with the logging message. However, when I resume the activity from the
journal, I do see the logging message that I have written in my code. Does
anyone know why logging seems to only happen when you resume an activity
from the journal and doesn't when you start an activity from scratch (I
start the activity using the sugar-launch command in the terminal).


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Devel mailing list