summaryrefslogtreecommitdiff
path: root/cloudinit/reporting
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2015-08-31 14:10:54 -0400
committerScott Moser <smoser@ubuntu.com>2015-08-31 14:10:54 -0400
commit8bcccd07d1dbde74126e81967388d2e5a90fcfa7 (patch)
tree4a07d439ff481c6c5f7c64dad5d39619801631c5 /cloudinit/reporting
parent7820a43baf94e11ce458476a442edd726a406aba (diff)
downloadvyos-cloud-init-8bcccd07d1dbde74126e81967388d2e5a90fcfa7.tar.gz
vyos-cloud-init-8bcccd07d1dbde74126e81967388d2e5a90fcfa7.zip
handlers: docstring fixups, and print actually do something
Diffstat (limited to 'cloudinit/reporting')
-rw-r--r--cloudinit/reporting/handlers.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/cloudinit/reporting/handlers.py b/cloudinit/reporting/handlers.py
index 5ed3cb84..140a98c5 100644
--- a/cloudinit/reporting/handlers.py
+++ b/cloudinit/reporting/handlers.py
@@ -22,12 +22,11 @@ class ReportingHandler(object):
@abc.abstractmethod
def publish_event(self, event):
- """Publish an event to the ``INFO`` log level."""
- print(event.as_string())
+ """Publish an event."""
class LogHandler(ReportingHandler):
- """Publishes events to the cloud-init log at the ``INFO`` log level."""
+ """Publishes events to the cloud-init log at the ``DEBUG`` log level."""
def __init__(self, level="DEBUG"):
super(LogHandler, self).__init__()
@@ -43,15 +42,16 @@ class LogHandler(ReportingHandler):
self.level = level
def publish_event(self, event):
- """Publish an event to the ``INFO`` log level."""
logger = logging.getLogger(
'.'.join(['cloudinit', 'reporting', event.event_type, event.name]))
logger.log(self.level, event.as_string())
class PrintHandler(ReportingHandler):
+ """Print the event as a string."""
+
def publish_event(self, event):
- """Publish an event to the ``INFO`` log level."""
+ print(event.as_string())
class WebHookHandler(ReportingHandler):