changeset 11984:2db0fccc8143

ui: add logging hook
author Matt Mackall <mpm@selenic.com>
date Thu, 19 Aug 2010 11:14:02 -0500
parents 27649cf258e3
children 81edef14922e
files mercurial/ui.py
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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