Skip to main content

Alpaca error logger for Django applications.

Project description

alpaca-django
=============

This is an Alpaca error logger for Django-based applications.

See https://github.com/msiedlarek/alpaca

Installation
------------

$ pip install alpaca-django

Example configuration
---------------------

LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'simple': {
'format': '%(asctime)s %(levelname)s %(name)s #%(lineno)s: %(message)s',
},
},
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'handlers': {
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
'formatter': 'simple'
},
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
},
'alpaca': {
'level': 'ERROR',
'filters': [],
'class': 'alpaca_django.log_handler.AlpacaLogHandler',
},
},
'loggers': {
'django.request': {
'handlers': ['mail_admins', 'alpaca',],
'level': 'ERROR',
'propagate': True,
},
'alpaca_django': {
'handlers': ['mail_admins', 'console',],
'level': 'DEBUG',
'propagate': False,
},
}
}

ALPACA_PROJECT_PATH_FRAGMENT = 'myproject'
ALPACA_ENVIRONMENT = 'staging'
ALPACA_MONITOR_HOST = 'monitoring.example.com'

License
-------

Copyright 2013 Mikołaj Siedlarek <msiedlarek@nctz.net>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

alpaca-django-0.3.0.tar.gz (6.4 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page