bxlogs
bxlogs is a minimal Python module for a basic logging setup. It exposes a single function, get_logger, which acts
as a wrapper around logging.getLogger to set a default output on stderr with a sensible format. That’s all.
Install
With pip:
pip install bxlogs
With poetry:
poetry add bxlogs
Usage
from bxlogs import get_logger
logger = get_logger("my.module")
logger.info("all set!")
The default level is INFO.
You can set the level to DEBUG using various means:
debug=Truelevel="DEBUG"orlevel=logging.DEBUG- Set the environment variable
BX_DEBUG
from bxlogs import get_logger
# All the calls below are equivalent
logger = get_logger("my.module", debug=True)
logger = get_logger("my.module", level="DEBUG")
import logging
logger = get_logger("my.module", level=logging.DEBUG)
import os
os.environ["BX_DEBUG"] = "1"
logger = get_logger("my.module")
You can set any other level using level=.
There’s nothing more. If you need anything more complex than that, use the Python logging module directly.
Metadata
Release files for bxlogs 0.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 |
|---|---|---|---|---|
| bxlogs-0.1.0.tar.gz | 2.7 kB | Without provenance | Details for bxlogs-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bxlogs-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for bxlogs-0.1.0-py3-none-any.whl |
Total release size: 6.0 kB
Release files / bxlogs-0.1.0.tar.gz
| Download URL | bxlogs-0.1.0.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c4832c0de37207f5772cf090a3868cced687ad8aac6eb8812a0310affefbf26a
|
|
BLAKE2b-256 checksum How to use checksums |
9f8d5acd69f5b843a66d10c03a90b2a24cd8acec8b3bea044e3fb472303a919f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.9.7 Linux/5.15.0-1040-azure
|
Release files / bxlogs-0.1.0-py3-none-any.whl
| Download URL | bxlogs-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5fa33bb8a8100210d210b03317b29ec3748232f6f628953d558436d21587df0e
|
|
BLAKE2b-256 checksum How to use checksums |
c475ba8fc677f922611f8edd5125295eca7fd27d3b1f847bc2f29794b9f993c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.9.7 Linux/5.15.0-1040-azure
|
Security for bxlogs 0.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.