Logging for Stockholm University
Project description
Logging for Stockholm University
Easy to use logging for Stockholm University.
Usage
from su.logging import logging
logger = logging.getLogger("myapp")
logger.info("My INFO message")
Structured logging
We use
logstash_formatter's
LogstashFormatterV1
and remove some unused/unnecesary fields.
from su.logging import structured, logging
logger = logging.getLogger("myapp")
logger.info("User logged in", extra={"user": "simlu"})
try:
raise Exception("User performed illegal activity")
except Exception as e:
logger.exception(e, extra={"user": "simlu"})
TODO
- Some sort of versioning?
- Add STDOUT handler?
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
su-logging-0.1.1.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for su_logging-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 105c9aca5db8a3a7b0377c74afbf9a9b93f4d046bbb089a501272096d51cd4d4 |
|
MD5 | c482cd5ad3183d966a145209b605ee1a |
|
BLAKE2b-256 | 7b114fcf355a67e7c9711768cac34d23d6abebb432409436127fd7ea4be67ece |