Skip to content

Commit

Permalink
Fix double sentry.init()
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Valsecchi committed Sep 11, 2017
1 parent 8a4d1a8 commit ee3d8eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions c2cwsgiutils/sentry.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ def init(config=None):
for key, value in os.environ.items() if key.startswith('SENTRY_TAG_')}
client_info['ignore_exceptions'] = client_info.get('ignore_exceptions', 'SystemExit').split(",")
client = Client(sentry_url, **client_info)
LOG.info("Configured sentry reporting with client=%s", repr(client_info))
handler = SentryHandler(client=client)
handler.setLevel(_utils.env_or_config(config, 'SENTRY_LEVEL', 'c2c.sentry_level', 'ERROR').upper())

excludes = _utils.env_or_config(config, "SENTRY_EXCLUDES", "c2c.sentry.excludes", "raven").split(",")
setup_logging(handler, exclude=excludes)
LOG.info("Configured sentry reporting with client=%s", repr(client_info))
if setup_logging(handler, exclude=excludes):
LOG.info("Configured sentry logging hook")


@contextlib.contextmanager
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from setuptools import setup, find_packages


VERSION = '0.24.0'
VERSION = '0.24.1'
HERE = os.path.abspath(os.path.dirname(__file__))
INSTALL_REQUIRES = open(os.path.join(HERE, 'requirements.txt')).read().splitlines()

Expand Down

0 comments on commit ee3d8eb

Please sign in to comment.