minilog
A minimalistic logging wrapper for Python.
Usage
Every project should utilize logging, but for simple use cases, this requires a bit too much boilerplate. Instead of including all of this in your modules:
import logging
log = logging.getLogger(__name__)
def greet(name):
log.info("Hello, %s!", name)
if __name__ == "__main__":
logging.basicConfig(
level=logging.INFO,
format="%(levelname)s: %(name)s: %(message)s",
)
with this package you can simply:
import log
def greet(name):
log.info("Hello, %s!", name)
if __name__ == "__main__":
log.init()
It will produce the exact same standard library logging records behind the scenes with automatic formatting for non-strings.
Installation
Install this library directly into an activated virtual environment:
$ pip install minilog
or add it to your Poetry project:
$ poetry add minilog
Documentation
To view additional options, please consult the full documentation.
Release files for minilog 2.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| minilog-2.3.1.tar.gz | 7.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| minilog-2.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.3 kB
Release files / minilog-2.3.1.tar.gz
| Download URL | minilog-2.3.1.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b602572c3bcdd2d8f00d879f635c0de9e632d5d0307e131c91074be8acf444e
|
|
BLAKE2b-256 checksum How to use checksums |
e3c96d4dc9bcd4b97ed89f482eeec0e6bb025942744689215dc2a4ed50415ea4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.7 Darwin/23.6.0
|
Release files / minilog-2.3.1-py3-none-any.whl
| Download URL | minilog-2.3.1-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1a679fefe6140ce1d59c3246adc991f9eb480169e5a6c54d2be9023ee459dc30
|
|
BLAKE2b-256 checksum How to use checksums |
bc33731b5be35c83268725451d25eeac78fa0625e9d0c8f115ad3b1e5173737f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.7 Darwin/23.6.0
|