Zhou Zheng Sheng has posted comments on this change.
Change subject: logging: setup log filter correctly ......................................................................
Patch Set 1: (1 inline comment)
Thanks Mark Wu. fileConfig() does not support filter maybe the original logging implementation limitation. Instead of improve fileConfig() with filter support, people add dictConfig() to improve several things including filter support (http://www.python.org/dev/peps/pep-0391/) .
Maybe we can firstly change logger.conf into YAML or JSON format, then use dictConfig() on the de-serialized dict.
.................................................... File vdsm/logUtils.py Line 162: except: Line 163: self.handleError(record) Line 164: Line 165: Line 166: def getFilteredClass(logHandlerClass, *filters): I think getFilteredClass() can be used on logger objects as well, so I use a more general name. Maybe it can be
def getFiltered(logClass, *filters): Line 167: class Filtered(logHandlerClass): Line 168: def __init__(self, *args, **kwargs): Line 169: logHandlerClass.__init__(self, *args, **kwargs) Line 170: for aFilter in filters:
-- To view, visit http://gerrit.ovirt.org/9688 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I76c2f77c95dd44853f070c8f7b7a8b71cfd6866c Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com