MCPcopy
hub / github.com/OfflineIMAP/offlineimap / debug

Method debug

offlineimap/ui/UIBase.py:214–228  ·  view source on GitHub ↗
(self, debugtype, msg)

Source from the content-addressed store, hash-verified

212 return None
213
214 def debug(self, debugtype, msg):
215 cur_thread = threading.currentThread()
216 if not cur_thread in self.debugmessages:
217 # deque(..., self.debugmsglen) would be handy but was
218 # introduced in p2.6 only, so we'll need to work around and
219 # shorten our debugmsg list manually :-(
220 self.debugmessages[cur_thread] = deque()
221 self.debugmessages[cur_thread].append("%s: %s" % (debugtype, msg))
222
223 # Shorten queue if needed
224 if len(self.debugmessages[cur_thread]) > self.debugmsglen:
225 self.debugmessages[cur_thread].popleft()
226
227 if debugtype in self.debuglist: # log if we are supposed to do so
228 self.logger.debug("[%s]: %s" % (debugtype, msg))
229
230 def add_debug(self, debugtype):
231 global debugtypes

Callers 15

registerthreadMethod · 0.95
unregisterthreadMethod · 0.95
syncfoldersMethod · 0.95
savemessageMethod · 0.95
new_mesgFunction · 0.45
__md5handlerMethod · 0.45
__loginauthMethod · 0.45
__plainhandlerMethod · 0.45
__xoauth2handlerMethod · 0.45
__gsshandlerMethod · 0.45
__start_tlsMethod · 0.45
__authn_helperMethod · 0.45

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected