~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: Robert Collins
  • Date: 2005-10-10 23:18:27 UTC
  • mfrom: (1437)
  • mto: This revision was merged to the branch mainline in revision 1438.
  • Revision ID: robertc@robertcollins.net-20051010231827-f9e2dda2e92bf565
mergeĀ fromĀ upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
161
161
    The exception string representation is used as the error
162
162
    summary, unless msg is given.
163
163
    """
 
164
    command = ' '.join(repr(arg) for arg in sys.argv)
 
165
    prefix = "command: %s\npwd: %s\n" % (command, os.getcwd())
164
166
    if msg == None:
165
167
        ei = sys.exc_info()
166
168
        msg = str(ei[1])
167
169
    if msg and (msg[-1] == '\n'):
168
170
        msg = msg[:-1]
169
171
    ## msg = "(%s) %s" % (str(type(ei[1])), msg)
170
 
    _bzr_logger.exception(msg)
 
172
    _bzr_logger.exception(prefix + msg)
171
173
 
172
174
 
173
175