Changeset 4505

Show
Ignore:
Timestamp:
10/15/08 15:44:06 (3 months ago)
Author:
coling
Message:

Change prints to proper logging.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • clientsplugin/0.11/clients/action_email.py

    r4485 r4505  
    4646      self.transform = etree.XSLT(etree.fromstring(str(event.action_options['XSLT']['value']))) 
    4747    except: 
    48       print "Error: Cannot load/parse stylesheet" 
     48      self.env.log.error("Error: Cannot load/parse stylesheet") 
    4949      return False 
    5050 
  • clientsplugin/0.11/clients/events.py

    r4502 r4505  
    237237 
    238238        if not summary.init(self, client): 
    239           print "Could not init summary" 
     239          self.env.log.info("Could not init summary") 
    240240          return False 
    241241        if not action.init(self, client): 
    242           print "Could not init action" 
     242          self.env.log.info("Could not init action") 
    243243          return False 
    244244 
    245         print "Performing action" 
     245        self.env.log.debug("Performing action") 
    246246        return action.perform(req, summary.get_summary(req, fromdate, todate)) 
    247247 
     
    272272          ev = cls(env, event, None, db) 
    273273        except: 
    274           print "Could not run the event %s" % (event,
     274          env.log.error("Could not run the event %s" % (event,)
    275275          return 
    276276        #ev.lastrun = 1 
     
    280280        cursor.execute("SELECT name FROM client ORDER BY name") 
    281281        for client, in cursor: 
    282           print "Running event for client: %s" % (client,
     282          env.log.info("Running event for client: %s" % (client, )
    283283          clev = cls(env, event, client) 
    284284          clev.trigger(req, client, ev.lastrun, now) 
  • clientsplugin/0.11/clients/summary_milestone.py

    r4504 r4505  
    124124          milestones[milestone]['hours'] += float(estimatedhours)  
    125125 
    126       if self.debug: 
    127         print "  Summarising ticket #%s" % tid 
     126      self.env.log.debug("  Summarising ticket #%s" % tid) 
    128127      ticket = etree.SubElement(xsummary, 'ticket') 
    129128      etree.SubElement(ticket, 'id').text = str(tid) 
     
    146145      file.write(etree.tostring(xml, pretty_print=True)) 
    147146      file.close() 
    148       print " Wrote XML to /tmp/send-client-email.xml" 
     147      self.env.log.debug(" Wrote XML to /tmp/send-client-email.xml") 
    149148 
    150149    if not have_data: 
  • clientsplugin/0.11/clients/summary_ticketchanges.py

    r4451 r4505  
    127127       
    128128      if self.debug: 
    129         print "  Change notification (%s) for ticket #%s" % (cgfield, tid
     129        self.env.log.debug("  Change notification (%s) for ticket #%s" % (cgfield, tid)
    130130      have_data = True 
    131131      if lasttid != tid: 
     
    153153      file.write(etree.tostring(xml, pretty_print=True)) 
    154154      file.close() 
    155       print " Wrote XML to /tmp/send-client-email.xml" 
     155      self.env.log.debug(" Wrote XML to /tmp/send-client-email.xml") 
    156156 
    157157    if not have_data: