~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: Martin Pool
  • Date: 2005-04-15 03:32:32 UTC
  • Revision ID: mbp@sourcefrog.net-20050415033232-b8d22f06e5a3fd05
- Put proper prefix at start of exceptions in trace file

Show diffs side-by-side

added added

removed removed

Lines of Context:
144
144
 
145
145
 
146
146
def log_exception(e):
147
 
    import traceback
148
 
    traceback.print_exc(None, _tracefile)
 
147
    import traceback, cStringIO
 
148
    s = cStringIO.StringIO()
 
149
    traceback.print_exc(None, s)
 
150
    for l in s.getvalue().split('\n'):
 
151
        _write_trace(l)
 
152
        
149
153