~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: John Arbash Meinel
  • Date: 2008-10-30 00:55:00 UTC
  • mto: (3815.2.5 prepare-1.9)
  • mto: This revision was merged to the branch mainline in revision 3811.
  • Revision ID: john@arbash-meinel.com-20081030005500-r5cej1cxflqhs3io
Switch so that we are using a simple timestamp as the first action.

Show diffs side-by-side

added added

removed removed

Lines of Context:
246
246
    # Do this before we open the log file, so we prevent
247
247
    # get_terminal_encoding() from mutter()ing multiple times
248
248
    term_encoding = osutils.get_terminal_encoding()
 
249
    start_time = time.strftime('%Y-%m-%d %H:%M:%S\n',
 
250
                               time.localtime(_bzr_log_start_time))
249
251
    # create encoded wrapper around stderr
250
252
    bzr_log_file = _open_bzr_log()
 
253
    bzr_log_file.write(start_time)
251
254
    push_log_file(bzr_log_file,
252
255
        r'[%(process)5d] %(asctime)s.%(msecs)03d %(levelname)s: %(message)s',
253
256
        r'%Y-%m-%d %H:%M:%S')
254
 
    mutter('enabling logging: %s', time.asctime())
255
257
    # after hooking output into bzr_log, we also need to attach a stderr
256
258
    # handler, writing only at level info and with encoding
257
259
    writer_factory = codecs.getwriter(term_encoding)