Anonymous avatar Anonymous committed 6ed9a0a

more logging

Comments (0)

Files changed (3)


 from boto.ec2.connection import EC2Connection
 import time
+import logging
+log = logging.getLogger(__name__)
 class CommandError(Exception):
             return None
     def start(self):
-        instances = self._conn.start_instances(instance_ids=[self.config['instance_id']])
+        instance_id = self.config['instance_id']
+"Starting instance id: %s", instance_id)
+        instances = self._conn.start_instances(instance_ids=[instance_id])
         self.instance = inst = instances[0]
         self.status = inst.state
+"Status: %s", self.status)


 from email.mime.text import MIMEText
 import re
 from mako.template import Template
+import logging
+log = logging.getLogger(__name__)
 class ParseMail(object):
     def __init__(self, email):
         self._send(subject, body)
     def _send(self, subject, message):
         msg = MIMEText(message)
         to_addr = self.parsed_struct.effective_from
         msg = msg.as_string()
         smtp = smtplib.SMTP(self.config['smtp_host'], int(self.config['smtp_port']))
-        for addr in set([to_addr] + re.split(r',\s*', cc_addr)):
+        addrs = set([to_addr] + re.split(r',\s*', cc_addr))
+"Sending mail to %s", ", ".join(addrs))
+        log.debug(message)
+        for addr in addrs:
             smtp.sendmail(from_addr, addr, msg)
+          'boto',
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.