Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/ui.py @ 41004:ab92e2111408
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."
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 15 Dec 2018 16:24:08 +0900 |
parents | 691c68bc1222 |
children | 6603de284b0a |
comparison
equal
deleted
inserted
replaced
41003:49d48489a16b | 41004:ab92e2111408 |
---|---|
28 config, | 28 config, |
29 configitems, | 29 configitems, |
30 encoding, | 30 encoding, |
31 error, | 31 error, |
32 formatter, | 32 formatter, |
33 loggingutil, | |
33 progress, | 34 progress, |
34 pycompat, | 35 pycompat, |
35 rcutil, | 36 rcutil, |
36 scmutil, | 37 scmutil, |
37 util, | 38 util, |
487 | 488 |
488 if section in (None, 'trusted'): | 489 if section in (None, 'trusted'): |
489 # update trust information | 490 # update trust information |
490 self._trustusers.update(self.configlist('trusted', 'users')) | 491 self._trustusers.update(self.configlist('trusted', 'users')) |
491 self._trustgroups.update(self.configlist('trusted', 'groups')) | 492 self._trustgroups.update(self.configlist('trusted', 'groups')) |
493 | |
494 if section in (None, b'devel', b'ui') and self.debugflag: | |
495 tracked = set() | |
496 if self.configbool(b'devel', b'debug.extensions'): | |
497 tracked.add(b'extension') | |
498 if tracked: | |
499 logger = loggingutil.fileobjectlogger(self._ferr, tracked) | |
500 self.setlogger(b'debug', logger) | |
492 | 501 |
493 def backupconfig(self, section, item): | 502 def backupconfig(self, section, item): |
494 return (self._ocfg.backup(section, item), | 503 return (self._ocfg.backup(section, item), |
495 self._tcfg.backup(section, item), | 504 self._tcfg.backup(section, item), |
496 self._ucfg.backup(section, item),) | 505 self._ucfg.backup(section, item),) |