docs: def to_dict(self):
          """
          Returns:
              dict: Combined global and thread-specific logging context
          """
          with self._lock:
              result = {}
              if self._gpayload:
                  result.update(self._gpayload)
              if self._tpayload:
                  result.update(getattr(self._tpayload, "context", {}))
              return result