Revision: 2447
Author: janne.t.harkonen
Date: Tue Feb 16 07:21:23 2010
Log: Added message() to listener interface, issue 466
http://code.google.com/p/robotframework/source/detail?r=2447

Modified:
 /trunk/src/robot/output/listeners.py

=======================================
--- /trunk/src/robot/output/listeners.py        Tue Feb 16 06:08:24 2010
+++ /trunk/src/robot/output/listeners.py        Tue Feb 16 07:21:23 2010
@@ -104,6 +104,11 @@
             if li.version != 1:
                 li.call_method(li.log_message, msg.message, msg.level)

+    def message(self, msg):
+        for li in self._listeners:
+            if li.version != 1:
+                li.call_method(li.message, msg.message, msg.level)
+
     def output_file(self, name, path):
         for li in self._listeners:
             li.call_method(getattr(li, '%s_file' % name.lower()), path)
@@ -139,8 +144,9 @@

 class _ListenerProxy(AbstractLoggerProxy):
     _methods = ['start_suite', 'end_suite', 'start_test', 'end_test',
-                'start_keyword', 'end_keyword', 'log_message', 'output_file',
-                'summary_file', 'report_file', 'log_file', 'debug_file', 
'close']
+                'start_keyword', 'end_keyword', 'log_message', 'message',
+                'output_file', 'summary_file', 'report_file', 'log_file',
+                'debug_file', 'close']

     def __init__(self, name, args):
         listener = self._import_listener(name, args)

Reply via email to