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