# HG changeset patch # User Matt Mackall # Date 2010-08-19 16:14:02 # Node ID 2db0fccc81438a18329d4a1da0a694d2f8eae378 # Parent 27649cf258e3a13ae994350f400d6eb2792317a8 ui: add logging hook diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -593,6 +593,15 @@ class ui(object): 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