Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
75 lines (49 sloc) 2.03 KB

resurfaceio-logger-python

Logging usage of Python-based services, with user privacy by design.

Visit resurface.io for general information on usage logging.

PyPI version

Contents

Dependencies

Requires Python 3.6 or higher. No other dependencies to conflict with your app.

Installing With pip

pip install --upgrade usagelogger

Logging From Django

After installing the package, edit settings.py to register middleware.

MIDDLEWARE = [
    "django.middleware...",
    "usagelogger.django.HttpLoggerForDjango",
]

Now add a new section to settings.py for logging configuration.

USAGELOGGER = {
    'url': 'https://...',
    'rules': 'include strict'
}

Logging With API

Loggers can be directly integrated into your application using our API. This requires the most effort compared with the options described above, but also offers the greatest flexibility and control.

API documentation

Protecting User Privacy

Loggers always have an active set of rules that control what data is logged and how sensitive data is masked. All of the examples above apply a predefined set of rules (include strict), but logging rules are easily customized to meet the needs of any application.

Logging rules documentation


© 2016-2019 Resurface Labs Inc.

You can’t perform that action at this time.