For Python 3, the Customizing LogRecord should be placed at the beginning of the Adding contextual information to your logging output section.
___
Jiann-Ming Su

Sent with Proton Mail secure email.