Do not configure bugsnag without API key.
This commit is contained in:
parent
1da077422c
commit
b556caf8dd
@ -123,7 +123,7 @@ if app.config['DEBUG']:
|
|||||||
log.info('Pillar starting, debug=%s', app.config['DEBUG'])
|
log.info('Pillar starting, debug=%s', app.config['DEBUG'])
|
||||||
|
|
||||||
# Configure Bugsnag
|
# Configure Bugsnag
|
||||||
if not app.config.get('TESTING'):
|
if not app.config.get('TESTING') and app.config.get('BUGSNAG_API_KEY'):
|
||||||
bugsnag.configure(
|
bugsnag.configure(
|
||||||
api_key=app.config['BUGSNAG_API_KEY'],
|
api_key=app.config['BUGSNAG_API_KEY'],
|
||||||
project_root="/data/git/pillar/pillar",
|
project_root="/data/git/pillar/pillar",
|
||||||
@ -133,6 +133,8 @@ if not app.config.get('TESTING'):
|
|||||||
bs_handler = bugsnag.handlers.BugsnagHandler()
|
bs_handler = bugsnag.handlers.BugsnagHandler()
|
||||||
bs_handler.setLevel(logging.ERROR)
|
bs_handler.setLevel(logging.ERROR)
|
||||||
log.addHandler(bs_handler)
|
log.addHandler(bs_handler)
|
||||||
|
else:
|
||||||
|
log.info('Bugsnag NOT configured.')
|
||||||
|
|
||||||
# Google Cloud project
|
# Google Cloud project
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user