docs: def install_handler(self, app):
          """Install log handler."""
          from raven.contrib.celery import register_logger_signal, \
              register_signal
          from raven.contrib.flask import Sentry, make_client
          from raven.handlers.logging import SentryHandler
  
          # Installs sentry in app.extensions['sentry']
          level = getattr(logging, app.config['LOGGING_SENTRY_LEVEL'])
  
          # Get the Sentry class.
          cls = app.config['LOGGING_SENTRY_CLASS']
          if cls:
              if isinstance(cls, six.string_types):
                  cls = import_string(cls)
          else:
              cls = Sentry
  
          sentry = cls(
              app,
              logging=True,
              level=level
          )
  
          app.logger.addHandler(SentryHandler(client=sentry.client, level=level))
  
          # Capture warnings from warnings module
          if app.config['LOGGING_SENTRY_PYWARNINGS']:
              self.capture_pywarnings(
                  SentryHandler(sentry.client))
  
          # Setup Celery logging to Sentry
          if app.config['LOGGING_SENTRY_CELERY']:
              try:
                  register_logger_signal(sentry.client, loglevel=level)
              except TypeError:
                  # Compatibility mode for Raven<=5.1.0
                  register_logger_signal(sentry.client)
              register_signal(sentry.client)
  
          # Werkzeug only adds a stream handler if there's no other handlers
          # defined, so when Sentry adds a log handler no output is
          # received from Werkzeug unless we install a console handler
          # here on the werkzeug logger.
          if app.debug:
              logger = logging.getLogger('werkzeug')
              logger.setLevel(logging.INFO)
              logger.addHandler(logging.StreamHandler())