ui: add logging hook
authorMatt Mackall <mpm@selenic.com>
Thu, 19 Aug 2010 11:14:02 -0500
changeset 11984 2db0fccc8143
parent 11983 27649cf258e3
child 11985 81edef14922e
ui: add logging hook
mercurial/ui.py
--- a/mercurial/ui.py	Wed Aug 18 06:05:09 2010 +0530
+++ b/mercurial/ui.py	Thu Aug 19 11:14:02 2010 -0500
@@ -593,6 +593,15 @@
         else:
             self.debug('%s:%s %s%s\n' % (topic, item, pos, unit))
 
+    def log(self, service, message):
+        '''hook for logging facility extensions
+
+        service should be a readily-identifiable subsystem, which will
+        allow filtering.
+        message should be a newline-terminated string to log.
+        '''
+        pass
+
     def label(self, msg, label):
         '''style msg based on supplied label