~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: Andrew Bennetts
  • Date: 2010-01-13 23:16:20 UTC
  • mfrom: (4957 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4960.
  • Revision ID: andrew.bennetts@canonical.com-20100113231620-n6in2yjib2v6z03g
MergeĀ lp:bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
250
250
            bzr_log_file.write("bug reports to https://bugs.launchpad.net/bzr/+filebug\n\n")
251
251
        return bzr_log_file
252
252
    except IOError, e:
253
 
        warning("failed to open trace file: %s" % (e))
 
253
        # If we are failing to open the log, then most likely logging has not
 
254
        # been set up yet. So we just write to stderr rather than using
 
255
        # 'warning()'. If we using warning(), users get the unhelpful 'no
 
256
        # handlers registered for "bzr"' when something goes wrong on the
 
257
        # server. (bug #503886)
 
258
        sys.stderr.write("failed to open trace file: %s\n" % (e,))
254
259
    # TODO: What should happen if we fail to open the trace file?  Maybe the
255
260
    # objects should be pointed at /dev/null or the equivalent?  Currently
256
261
    # returns None which will cause failures later.