Dan Kenigsberg has posted comments on this change.
Change subject: [WIP] Logging in OOP
......................................................................
Patch Set 2: I would prefer that you didn't submit this
(3 inline comments)
drop [wip] since it's ready for use.
....................................................
File vdsm/storage/processPool.py
Line 33: from config import config
Line 34:
Line 35: MANAGE_PORT = config.getint("addresses", "management_port")
Line 36:
Line 37: _log = logging.getLogger("ProcessPool")
anything using this?
Line 38:
Line 39: class Timeout(RuntimeError): pass
Line 40: class NoFreeHelpersError(RuntimeError): pass
Line 41: class PoolClosedError(RuntimeError): pass
Line 148: # This is best utilized by starting all child processes at
once.
Line 149: self._helperPool = [Helper(self._logQueue) for i in
range(self._maxSubProcess)]
Line 150: self._lockPool = [Lock() for i in range(self._maxSubProcess)]
Line 151: self._closed = False
Line 152: # Add proccess for looging from oop
proccess --> thread, loogin --> logging
Line 153: self.logProc = threading.Thread(target=_helperLoggerLoop,
args=(self._logQueue,))
Line 154: self.logProc.daemon = True
Line 155: self.logProc.start()
Line 156:
Line 285: if hasattr(log, 'handlers'): del log.handlers[:]
Line 286:
Line 287: # Close all file-descriptors we don't need
Line 288: # Logging won't work past this point
Line 289: fdsWhiteList = [0, 1, 2, lifeLine, parentLifelineFD,
pipe.fileno(),
minor: ALLCAPS and (tupple) would have been nicer.
Line 290: logQueue._reader.fileno(),
logQueue._writer.fileno()]
Line 291: for fd in misc.getfds():
Line 292: if fd not in fdsWhiteList:
Line 293: try:
--
To view, visit http://gerrit.usersys.redhat.com/985
To unsubscribe, visit http://gerrit.usersys.redhat.com/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iabe8abf31f46469e3c6fdac670f0ff03fe9cefe8
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Igor Lvovsky <[email protected]>
Gerrit-Reviewer: Ayal Baron
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Igor Lvovsky <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/vdsm-patches