Ticket #163: write_debug_file_in_profile_163.patch

File write_debug_file_in_profile_163.patch, 1.2 KB (added by erikos, 15 years ago)

the corresponding sugar-toolkit patch

  • src/sugar/profile.py

    diff --git a/src/sugar/profile.py b/src/sugar/profile.py
    index edfda86..cce45a7 100644
    a b class Profile(object): 
    173173        except OSError:
    174174            logging.error('Error removing old profile.')
    175175
     176    def create_debug_file(self):
     177        path = os.path.join(os.path.expanduser('~/.sugar'), 'debug')
     178        fd = open(path, 'w')
     179        text = '# Uncomment the following lines to turn on many' \
     180            'sugar debugging\n'\
     181            '# log files and features\n'\
     182            '#export LM_DEBUG=net\n' \
     183            '#export GABBLE_DEBUG=all\n' \
     184            '#export' \
     185            'GABBLE_LOGFILE=~/.sugar/default/logs/telepathy-gabble.log\n' \
     186            '#export SALUT_DEBUG=all\n' \
     187            '#export' \
     188            'SALUT_LOGFILE=~/.sugar/default/logs/telepathy-salut.log\n' \
     189            '#export GIBBER_DEBUG=all\n' \
     190            '#export PRESENCESERVICE_DEBUG=1\n' \
     191            '#export SUGAR_LOGGER_LEVEL=debug\n\n' \
     192            '# Uncomment the following line to enable core dumps\n' \
     193            '#ulimit -c unlimited\n'
     194        fd.write(text)       
     195        fd.close()
     196
    176197def get_profile():
    177198    global _profile
    178199