~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: Martin Pool
  • Date: 2006-11-02 06:25:59 UTC
  • mto: This revision was merged to the branch mainline in revision 2115.
  • Revision ID: mbp@sourcefrog.net-20061102062559-c935f73df6bf3fd0
save commit message if commit fails (#32054)

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
        zero_nine,
66
66
        )
67
67
 
 
68
lazy_import(globals(), """
 
69
from bzrlib import debug
 
70
""")
 
71
 
68
72
_file_handler = None
69
73
_stderr_handler = None
70
74
_stderr_quiet = False
118
122
    _trace_file.write(out)
119
123
    # TODO: jam 20051227 Consider flushing the trace file to help debugging
120
124
    #_trace_file.flush()
121
 
debug = mutter
122
125
 
123
126
 
124
127
def _rollover_trace_maybe(trace_fname):
182
185
    errors loading plugins.
183
186
    """
184
187
    import traceback
185
 
    debug(traceback.format_exc())
 
188
    mutter(traceback.format_exc())
186
189
 
187
190
 
188
191
def enable_default_logging():
285
288
 
286
289
    These don't get a traceback unless -Derror was given.
287
290
    """
288
 
    if 'error' in bzrlib.debug_flags:
 
291
    if 'error' in debug.debug_flags:
289
292
        report_bug(exc_info, err_file)
290
293
        return
291
294
    print >>err_file, "bzr: ERROR:", str(exc_info[1])