I'm not sure why this is happening yet, but _pickle.load() is
duplicating the StreamHandlers in LOG and resetting the log level to
ERROR. Work around that by saving the original level/handlers and
restoring them after the load() call.
I haven't figured out why this happens yet.
_fcntl.flock(self._datafile_lock.fileno(), locktype)
self.clear()
- self.extend(_pickle.load(self._datafile_lock))
+
+ level = LOG.level
+ handlers = list(LOG.handlers)
+ feeds = list(_pickle.load(self._datafile_lock))
+ LOG.setLevel(level)
+ LOG.handlers = handlers
+ self.extend(feeds)
if locktype == 0:
self._datafile_lock.close()