prettylog
Let’s write beautiful logs:
import logging
from prettylog import basic_config
# Configure logging
basic_config(level=logging.INFO, buffered=False, log_format='color')
Available formats
stream - default behaviour
color - colored logs
json - json representation
syslog - writes to syslog
Quick start
Setting up json logs:
import logging
from prettylog import basic_config
# Configure logging
basic_config(level=logging.INFO, buffered=False, log_format='json')
Buffered log handler
Parameter buffered=True enables memory buffer which flushing logs delayed.
import logging
from prettylog import basic_config
basic_config(
level=logging.INFO,
buffered=True,
buffer_size=10, # flush each 10 log records
flush_level=loggging.ERROR, # or when record with this level will be sent
log_format='color',
date_format=None, # Disable date for logs, True enables it.
# str with format is custom date format.
)
Metadata
Release files for prettylog 0.3.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 |
|---|---|---|---|---|
| prettylog-0.3.0.tar.gz | 4.2 kB | Without provenance | Details for prettylog-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| prettylog-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for prettylog-0.3.0-py3-none-any.whl |
Total release size: 8.3 kB
Release files / prettylog-0.3.0.tar.gz
| Download URL | prettylog-0.3.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e417a7988ef26b457ef9021e0e6417d01d0c49b41732a0fe255b5bed109396f0
|
|
BLAKE2b-256 checksum How to use checksums |
5f41b651d83744047f063d2afbc9a13e6e7e9892874c15d5cdc6c9b8f5832164
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Release files / prettylog-0.3.0-py3-none-any.whl
| Download URL | prettylog-0.3.0-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d0880b5fb0986237e21511e85a6c2a942a0087e65ad0a836b77a5b59ce44cd58
|
|
BLAKE2b-256 checksum How to use checksums |
a6ef38159268150bd6872864951d8efb661aa153362dfd150fb74ecbb3fc9db0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Security for prettylog 0.3.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.