~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: Martin Pool
  • Date: 2008-11-11 00:57:17 UTC
  • mfrom: (3815.3.2 1.9)
  • mto: This revision was merged to the branch mainline in revision 3827.
  • Revision ID: mbp@sourcefrog.net-20081111005717-m9qvlrdwqg8obh1q
Merge 1.9final and its sftp fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
230
230
    # TODO: What should happen if we fail to open the trace file?  Maybe the
231
231
    # objects should be pointed at /dev/null or the equivalent?  Currently
232
232
    # returns None which will cause failures later.
 
233
    return None
233
234
 
234
235
 
235
236
def enable_default_logging():
250
251
                                           timezone='local')
251
252
    # create encoded wrapper around stderr
252
253
    bzr_log_file = _open_bzr_log()
253
 
    bzr_log_file.write(start_time.encode('utf-8') + '\n')
 
254
    if bzr_log_file is not None:
 
255
        bzr_log_file.write(start_time.encode('utf-8') + '\n')
254
256
    push_log_file(bzr_log_file,
255
257
        r'[%(process)5d] %(asctime)s.%(msecs)03d %(levelname)s: %(message)s',
256
258
        r'%Y-%m-%d %H:%M:%S')