'Enters this logging context into thread local storage'

def __enter__(self):

    old_context = self.set_current_context(self)
    if (self.previous_context != old_context):
        logger.warn('Expected    previous    context    %r,    found    %r', self.previous_context, old_context)
    self.alive = True
    return self
