'Enable logging of warnings.warn() calls
Once called, any subsequent calls to ``warnings.warn()`` are
redirected to this logger and emitted with level ``WARN``. Note that
this replaces the output from ``warnings.warn``.
This can be disabled with ``disable_warnings_logging``.'

def enable_warnings_logging(self):

    if self.warnings_logging_enabled():
        raise LoggingError('Warnings    logging    has    already    been    enabled')
    self._showwarning_orig = warnings.showwarning
    warnings.showwarning = self._showwarning
