Pre-release
This release is a pre-release and may not be stable for production use.
Unix: Windows:
Metrics:
Usage:
Overview
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
logging.basicConfig(
level=logging.INFO,
format="%(levelname)s: %(name)s: %(message)s",
)
log = logging.getLogger(__name__)
def greet(name):
log.info("Hello, %s!", name)
with this package you can simply:
import log
def greet(name):
log.info("Hello, %s!", name)
It will produce the exact same standard library logging records behind the scenes.
Installation
$ pip install minilog
Revision History
1.1 (unreleased)
- Added
%(relpath)slogging format. - Added
verbosityasinit()option to work with Django admin commands.
1.0 (2018-09-27)
- Initial stable release.
0.5 (2018-09-07)
- Disabled automatic logging configuration when invoked by
pytest.
0.4 (2018-4-28)
- Added
reset=Trueasinit()option to replace all existing logging handlers. - Added
exceptionlogging API. - Added convenience alias:
log.c,log.exc.
0.3.1 (2018-03-30)
- Fixed bug where records were written for disabled levels.
0.3 (2018-03-15)
- Exposed
logginglevel constants on thelogpackage. - Added
log.WARNas an alias oflog.WARNING.
0.2.1 (2018-03-04)
- Removed the Python version check on installation.
0.2 (2018-03-03)
- Added method to force logging format:
log.init(format="...") - Added method to silenced named loggers:
log.silence('requests', allow_error=True) - Added convenience aliases:
log.d,log.i,log.w,log.e
0.1 (2018-03-03)
- Initial release.
Metadata
Release files for minilog 1.1b1
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-1.1b1.tar.gz | 8.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| minilog-1.1b1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.7 kB
Release files / minilog-1.1b1.tar.gz
| Download URL | minilog-1.1b1.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b429cc09bfa84227036ad6877de4b072fff25111da3f67d01a7d52542bc4ee43
|
|
BLAKE2b-256 checksum How to use checksums |
fd77dc9e2808b7f351260125562b3353503c6741741febc0a44e6aca2a02cd94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5
|
Release files / minilog-1.1b1-py3-none-any.whl
| Download URL | minilog-1.1b1-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f7f0f3cbe97efc8ddf8e2a295b96e5909436b2a20f2ee0a0bb578acfc97307f6
|
|
BLAKE2b-256 checksum How to use checksums |
0cf0bc99b361b108cc668758302985240826d2d3e64ff5c93e75c6aa654dcb59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5
|