ui: install logger that sends debug.extensions messages to stderr
This will replace the custom log function introduced at
d58958676b3c
"extensions: add detailed loading information."
--- a/mercurial/ui.py Sat Dec 15 19:05:42 2018 +0900
+++ b/mercurial/ui.py Sat Dec 15 16:24:08 2018 +0900
@@ -30,6 +30,7 @@
encoding,
error,
formatter,
+ loggingutil,
progress,
pycompat,
rcutil,
@@ -490,6 +491,14 @@
self._trustusers.update(self.configlist('trusted', 'users'))
self._trustgroups.update(self.configlist('trusted', 'groups'))
+ if section in (None, b'devel', b'ui') and self.debugflag:
+ tracked = set()
+ if self.configbool(b'devel', b'debug.extensions'):
+ tracked.add(b'extension')
+ if tracked:
+ logger = loggingutil.fileobjectlogger(self._ferr, tracked)
+ self.setlogger(b'debug', logger)
+
def backupconfig(self, section, item):
return (self._ocfg.backup(section, item),
self._tcfg.backup(section, item),