debian-python-raven/raven/conf/defaults.py

71 lines
2.0 KiB
Python
Raw Normal View History

"""
2011-10-07 19:57:45 +02:00
raven.conf.defaults
~~~~~~~~~~~~~~~~~~~
2011-09-11 20:08:49 +02:00
Represents the default values for all Sentry settings.
2011-09-11 20:08:49 +02:00
2012-10-12 19:45:54 +02:00
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
2011-09-11 20:08:49 +02:00
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import os
import os.path
import socket
2011-05-08 05:22:09 +02:00
ROOT = os.path.normpath(os.path.join(os.path.dirname(__file__), os.pardir))
# This should be the full URL to sentries store view
SERVERS = None
2013-01-28 09:18:41 +01:00
TIMEOUT = 1
# TODO: this is specific to Django
2011-10-07 19:57:45 +02:00
CLIENT = 'raven.contrib.django.DjangoClient'
# Not all environments have access to socket module, for example Google App Engine
# Need to check to see if the socket module has ``gethostname``, if it doesn't we
# will set it to None and require it passed in to ``Client`` on initializtion.
NAME = socket.gethostname() if hasattr(socket, 'gethostname') else None
2011-10-14 01:56:41 +02:00
# Superuser key -- will be used if set, otherwise defers to
# SECRET_KEY and PUBLIC_KEY
KEY = None
# Credentials to authenticate with the Sentry server
SECRET_KEY = None
PUBLIC_KEY = None
# We allow setting the site name either by explicitly setting it with the
# SENTRY_SITE setting, or using the django.contrib.sites framework for
# fetching the current site. Since we can't reliably query the database
# from this module, the specific logic is within the SiteFilter
SITE = None
2011-09-06 19:09:27 +02:00
# The maximum number of elements to store for a list-like structure.
MAX_LENGTH_LIST = 50
2011-09-06 19:09:27 +02:00
# The maximum length to store of a string-like structure.
2012-04-19 06:40:37 +02:00
MAX_LENGTH_STRING = 400
# Automatically log frame stacks from all ``logging`` messages.
AUTO_LOG_STACKS = False
2011-10-16 21:05:59 +02:00
# Collect locals variables
CAPTURE_LOCALS = True
2011-10-16 21:05:59 +02:00
# Client-side data processors to apply
PROCESSORS = (
'raven.processors.SanitizePasswordsProcessor',
2011-12-29 12:04:29 +01:00
)
# Default Project ID
PROJECT = 1
2014-06-03 02:35:02 +02:00
try:
# Try for certifi first since they likely keep their bundle more up to date
import certifi
CA_BUNDLE = certifi.where()
except ImportError:
CA_BUNDLE = os.path.join(ROOT, 'data', 'cacert.pem')