Skip to main content

A Log Tool for Django

Project description

Django Global Log

注册到 installed_apps

INSTALLED_APPS = [
    "corsheaders",
    "django_global_log",
    ···
]

添加 middleware

MIDDLEWARE = [
    "corsheaders.middleware.CorsMiddleware",
    "django_global_log.middlewares.DjangoGlobalLogMiddleware",
    ···
]

使用 celery

GLOBAL_LOG_CELERY_FUNC = "async_global_log"

def async_global_log(detail):
    DjangoGlobalLog.objects.create(**detail)

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

django_global_log-0.0.6.tar.gz (5.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page