loggerr

Zero configuration JSON logger(r)
from loggerr import Loggerr
logger = Loggerr("warn")
logger.info("Something going as expected", { "host": socket.gethostname() }) # ignored
logger.warn("Something must have gone terribly wrong") # sent
except Exception as e:
logger.error(e, { request: "this was the request" })
Log level
Create logger instance with a minimal log level
Log levels are (respectively):
- debug
- verbose
- info
- warn
- error
- critical
For example, a logger with log level "warn" will only print logs with level "warn", "error", or "critical".
Synonyms
A couple of function synonyms have been placed to your convenience:
| function | will log with level |
|---|---|
logger.log(...) |
"info" |
logger.warning(...) |
"warn" |
logger.fatal(...) |
"critical" |
logger.panic(...) |
"critical" |
Arguments
Create: Loggerr class accepts one or two arguments:
- {string} Case insensitive name of minimal log level. defaults to 'info'
- {dictionary} {'Key':'Value'} pairs, optional. Persistent enrichment fields for all log records
logger = Loggerr(os.environ["LOG_LEVEL"], { "host": socket.gethostname() })
Send:Logger functions accept one or two arguments:
- {any} Record's "message" field. Traditionally this would be a string or an exception.
- {dictionary} {'Key':'Value'} pairs, optional. Values should be JSON serializable
logger.info("something, something", { dark: "side" })
Metadata
Release files for loggerr 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| loggerr-1.1.0.tar.gz | 3.6 kB | Without provenance | Details for loggerr-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| loggerr-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for loggerr-1.1.0-py3-none-any.whl |
Total release size: 7.6 kB
Release files / loggerr-1.1.0.tar.gz
| Download URL | loggerr-1.1.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d6088b15474e6a31dd3d29412dc286855ca932663c488a0c3dae3eed0301040
|
|
BLAKE2b-256 checksum How to use checksums |
15cc0ab08152a1becd70ad74ce9271b016b489801400775b5686464c9598e9f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.4
|
Release files / loggerr-1.1.0-py3-none-any.whl
| Download URL | loggerr-1.1.0-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b0891011fc4c8dc73329e87892cdc3fa7bf56f3b501ed7f5dbc2d4aaf2851593
|
|
BLAKE2b-256 checksum How to use checksums |
db73a67502ee949a9217d77f8acf82d70f06d67cca41a3a61ebaf68a0144c515
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.4
|
Security for loggerr 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.