mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Sentry: Tune log levels
This commit is contained in:
@@ -121,7 +121,7 @@ def widget_js(request, lang, **kwargs):
|
||||
try:
|
||||
resp = HttpResponse(default_storage.open(fname).read(), content_type='text/javascript')
|
||||
except:
|
||||
logger.exception('Failed to open widget.js')
|
||||
logger.critical('Failed to open widget.js')
|
||||
|
||||
if not resp:
|
||||
data = generate_widget_js(lang).encode()
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import configparser
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
|
||||
@@ -567,17 +568,28 @@ LOGGING = {
|
||||
if config.has_option('sentry', 'dsn'):
|
||||
import sentry_sdk
|
||||
from sentry_sdk.integrations.celery import CeleryIntegration
|
||||
from sentry_sdk.integrations.logging import ignore_logger
|
||||
from sentry_sdk.integrations.logging import LoggingIntegration, ignore_logger
|
||||
from .sentry import PretixSentryIntegration
|
||||
|
||||
sentry_sdk.init(
|
||||
dsn=config.get('sentry', 'dsn'),
|
||||
integrations=[PretixSentryIntegration(), CeleryIntegration()],
|
||||
integrations=[
|
||||
PretixSentryIntegration(),
|
||||
CeleryIntegration(),
|
||||
LoggingIntegration(
|
||||
level=logging.INFO,
|
||||
event_level=logging.CRITICAL
|
||||
)
|
||||
],
|
||||
environment=SITE_URL,
|
||||
release=__version__,
|
||||
send_default_pii=False
|
||||
send_default_pii=False,
|
||||
|
||||
)
|
||||
ignore_logger('pretix.base.tasks')
|
||||
ignore_logger('pretix.plugins.stripe')
|
||||
ignore_logger('pretix.plugins.paypal')
|
||||
ignore_logger('pretix.plugins.banktransfer')
|
||||
|
||||
CELERY_TASK_SERIALIZER = 'json'
|
||||
CELERY_RESULT_SERIALIZER = 'json'
|
||||
|
||||
Reference in New Issue
Block a user