/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: Martin Pool
  • Date: 2008-02-06 00:41:04 UTC
  • mfrom: (3215 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3219.
  • Revision ID: mbp@sourcefrog.net-20080206004104-mxtn32habuhjq6b8
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
 
100
100
# The time the first message was written to the trace file, so that we can
101
101
# show relative times since startup.
102
 
_bzr_log_start_time = None
 
102
_bzr_log_start_time = bzrlib._start_time
103
103
 
104
104
 
105
105
# held in a global for quick reference
152
152
        out = fmt % tuple(real_args)
153
153
    else:
154
154
        out = fmt
155
 
    out += '\n'
156
 
    if 'times' in debug.debug_flags:
157
 
        global _bzr_log_start_time
158
 
        if _bzr_log_start_time is None:
159
 
            _bzr_log_start_time = time.time()
160
 
        timestamp = '%0.3f' % (time.time() - _bzr_log_start_time,)
161
 
        out = '%s %s' % (timestamp, out)
 
155
    timestamp = '%0.3f  ' % (time.time() - _bzr_log_start_time,)
 
156
    out = timestamp + out + '\n'
162
157
    _trace_file.write(out)
163
 
    # TODO: jam 20051227 Consider flushing the trace file to help debugging
164
 
    #_trace_file.flush()
 
158
    # no need to flush here, the trace file is now linebuffered when it's
 
159
    # opened.
165
160
 
166
161
 
167
162
def mutter_callsite(stacklevel, fmt, *args):