equal
deleted
inserted
replaced
206 def format_txt (self, lines, full_timestamps=False) : |
206 def format_txt (self, lines, full_timestamps=False) : |
207 # ...handle each line |
207 # ...handle each line |
208 for line in lines : |
208 for line in lines : |
209 # extra args |
209 # extra args |
210 extra = {} |
210 extra = {} |
211 |
211 |
212 # specialcase type? |
212 # default to line.type |
|
213 type = line.type |
|
214 |
|
215 # special formatting for unset-Topic |
213 if line.type == LogTypes.TOPIC and line.data is None : |
216 if line.type == LogTypes.TOPIC and line.data is None : |
214 type = 'TOPIC_UNSET' |
217 type = 'TOPIC_UNSET' |
215 |
218 |
216 else : |
|
217 type = line.type |
|
218 |
|
219 # format netsplit stuff |
219 # format netsplit stuff |
220 if line.type & LogTypes._NETSPLIT_MASK : |
220 elif line.type & LogTypes._NETSPLIT_MASK : |
221 # format the netsplit-targets stuff |
221 # format the netsplit-targets stuff |
222 extra['_netsplit_targets'] = line.data |
222 extra['_netsplit_targets'] = line.data |
223 |
223 |
224 # using __TYPES |
224 # using __TYPES |
225 yield line, self._format_line_text(line, self.__FMT, type, full_timestamps, **extra) |
225 yield line, self._format_line_text(line, self.__FMT, type, full_timestamps, **extra) |