mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
logging: Added tests for _logRecordClass changes.
This commit is contained in:
parent
7004bd1a3d
commit
6fac817136
3 changed files with 51 additions and 2 deletions
|
|
@ -973,6 +973,7 @@ class Manager(object):
|
|||
self.emittedNoHandlerWarning = 0
|
||||
self.loggerDict = {}
|
||||
self.loggerClass = None
|
||||
self.logRecordClass = None
|
||||
|
||||
def getLogger(self, name):
|
||||
"""
|
||||
|
|
@ -1016,6 +1017,13 @@ class Manager(object):
|
|||
+ klass.__name__)
|
||||
self.loggerClass = klass
|
||||
|
||||
def setLogRecordClass(self, cls):
|
||||
"""
|
||||
Set the class to be used when instantiating a log record with this
|
||||
Manager.
|
||||
"""
|
||||
self.logRecordClass = cls
|
||||
|
||||
def _fixupParents(self, alogger):
|
||||
"""
|
||||
Ensure that there are either loggers or placeholders all the way
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue