Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Logging for Stockholm University

Project description

Logging for Stockholm University

Easy to use logging for Stockholm University.


from su.logging import logging

logger = logging.getLogger("myapp")"My INFO message")

For easier developing you can also enable console logging:

from su.logging import console, logging

logger = logging.getLogger("myapp")"My INFO message")

Structured logging

We use logstash_formatter's LogstashFormatterV1 and remove some unused/unnecesary fields.

Depend on su-logging[structured] in e.g. your requirements.txt and then:

from su.logging import structured, logging

logger = logging.getLogger("myapp")"User logged in", extra={"user": "simlu"})

    raise Exception("User performed illegal activity")
except Exception as e:
    logger.exception(e, extra={"user": "simlu"})


Project details

Download files

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

Files for su-logging, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size su_logging-0.3.0-py3-none-any.whl (2.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size su-logging-0.3.0.tar.gz (2.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page