flog
Fast access to some simple python logging tricks
Installation
Either find flog on PyPI or install it with pip or easy_install
pip install flog #or easy_install flog
Basic Usage
Getting a logger: import flog, get a logger with flog.get_logger(__name__)
Logging calls: in and out Get a logger, decorate functions with flog.log_call(<your logger>)
Logging calls with sensitive args (such as passwords): Get a logger, decorate functions with flog.log_sensitive_call(<your logger>)
(new in version 0.1.0) In production environments, you may wish to run with the environment variable FLOG_NOWRAP set truthy. This will make flog.log_call and flog.log_sensitive_call exit as quickly as possible and not attempt to emit DEBUG-level statements. This can also be accomplished by running the interpreter in “optimized” mode (python -O <your entry> or by setting the PYTHONOPTIMIZE environment variable)
(new in version 0.2.0) flog.log_call and flog.log_sensitive_call both now optionally take a callable that will be called with logger-compatible arguments. Suggested uses would be to log at a higher-than-debug level, or piping into another stream handler.
(new in version 0.3.0) CorrelationLoggerAdapter to assist in adding log correlation ids. Use it with flog.CorrelationLoggerAdapter(logger, {"correlation_id": cid}) where cid is some correlation id.
License
This software is hereby released under the MIT License, as seen in the LICENSE file
Metadata
Release files for flog 0.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 | Provenance | Actions |
|---|---|---|---|---|
| flog-0.3.1.tar.gz | 4.7 kB | Without provenance | Details for flog-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flog-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for flog-0.3.1-py3-none-any.whl |
Total release size: 12.5 kB
Release files / flog-0.3.1.tar.gz
| Download URL | flog-0.3.1.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9464bae7fbb9776894926fe7f918569a9a687272efa4787a1e4de7d1902b7cff
|
|
BLAKE2b-256 checksum How to use checksums |
ac9872e58ad1c73eb31b8260753a9929b5e7b1681f57773af18233afcbc4cdce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.1 Darwin/23.2.0
|
Release files / flog-0.3.1-py3-none-any.whl
| Download URL | flog-0.3.1-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3bcab8792974d8d70ce3c57626c6bd7b652789d69e1d00dd13d0828f440dd51a
|
|
BLAKE2b-256 checksum How to use checksums |
c4873bae8771b633679f48a69ab6495433fb6e88fe4481a3b95ba21d46247ca8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.1 Darwin/23.2.0
|
Security for flog 0.3.1
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.