code: def write_traceback(logger=None, exc_info=None):
      
      if exc_info is None:
          exc_info = sys.exc_info()
      typ, exception, tb = exc_info
      traceback = "".join(_traceback_no_io.format_exception(typ, exception, tb))
      _writeTracebackMessage(logger, typ, exception, traceback)
docs: Write the latest traceback to the log.
  
      This should be used inside an C{except} block. For example:
  
           try:
               dostuff()
           except:
               write_traceback(logger)
  
      Or you can pass the result of C{sys.exc_info()} to the C{exc_info}
      parameter.