__init__.py 480 B

123456789101112131415161718192021
  1. # -*- coding: utf-8 -*-
  2. from __future__ import absolute_import, unicode_literals
  3. import logging
  4. from .command_metrics import CommandMetrics
  5. from .pool_metrics import PoolMetrics
  6. from .pool import Pool
  7. from .command import Command
  8. from .group import Group
  9. try: # Python 2.7+
  10. from logging import NullHandler
  11. except ImportError:
  12. class NullHandler(logging.Handler):
  13. def emit(self, record):
  14. pass
  15. logging.getLogger('hystrix').addHandler(NullHandler())