~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: Robert Collins
  • Date: 2005-10-06 22:15:52 UTC
  • mfrom: (1185.13.2)
  • mto: This revision was merged to the branch mainline in revision 1420.
  • Revision ID: robertc@robertcollins.net-20051006221552-9b15c96fa504e0ad
mergeĀ fromĀ upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
    # can get the exception details is we suppress them here.
55
55
 
56
56
    def format(self, record):
57
 
        s = 'bzr: '
58
57
        if record.levelno >= logging.WARNING:
59
 
            s += record.levelname + ': '
 
58
            s = 'bzr: ' + record.levelname + ': '
 
59
        else:
 
60
            s = ''
60
61
            
61
62
        s += record.getMessage()
62
63
 
163
164
    if msg == None:
164
165
        ei = sys.exc_info()
165
166
        msg = str(ei[1])
166
 
 
167
167
    if msg and (msg[-1] == '\n'):
168
168
        msg = msg[:-1]
169
 
        
 
169
    ## msg = "(%s) %s" % (str(type(ei[1])), msg)
170
170
    _bzr_logger.exception(msg)
171
171
 
172
172