logdna / python

A python package for sending logs to LogDNA
MIT License
48 stars 35 forks source link

fix: Don't overwrite base logging Handler class lock var #108

Closed shawkinsmezmo closed 1 year ago

shawkinsmezmo commented 1 year ago

The base logging.Handler class has it's own instance variable named self.lock. This variable is used to lock access to a given handler.

The current variable naming was overriding this lock, leading to deadlocks that would occur when the logging framework would attempt to acquire the base handler lock for configuration purposes, which would then cause any attempts by the logdna handler to acquire this lock to block indefinitely.

This PR addresses this issue by renaming the internal lock variable, ensuring that it remains logically distinct as it was intended.