Talk:HelloMesh: Difference between revisions
Jump to navigation
Jump to search
(problem seeing logs with fix) |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
== Logging == |
|||
⚫ | |||
I see now that it says I need to have logger debugging set but I didn't notice that at first. |
|||
⚫ | |||
self._logger = logging.getLogger('hellomesh-activity') |
self._logger = logging.getLogger('hellomesh-activity') |
||
Line 5: | Line 9: | ||
self._logger.setLevel(logging.DEBUG) # added this line two places in the code |
self._logger.setLevel(logging.DEBUG) # added this line two places in the code |
||
Then the Log Viewer would show the logs. Although setting debugging would work too I think it makes sense to put the calls directly in the activity since the activity's only purpose is to show the logs. Anyway, something to think about. ;) |
|||
Then the Log Viewer would show the logs. |
|||
:See http://wiki.laptop.org/go/AttachingSugarLogsToTickets --[[User:Morgs|morgs]] 09:03, 3 March 2008 (EST) |
Latest revision as of 14:03, 3 March 2008
Logging
I see now that it says I need to have logger debugging set but I didn't notice that at first.
So when I tried to use this activity to understand the mesh networking, but nothing was showing up in the Log Viewer. I fixed this by adding a .setLevel() call after the .getLogger() calls. For example:
self._logger = logging.getLogger('hellomesh-activity')
self._logger.setLevel(logging.DEBUG) # added this line two places in the code
Then the Log Viewer would show the logs. Although setting debugging would work too I think it makes sense to put the calls directly in the activity since the activity's only purpose is to show the logs. Anyway, something to think about. ;)
- See http://wiki.laptop.org/go/AttachingSugarLogsToTickets --morgs 09:03, 3 March 2008 (EST)