Wrappers to make eazy logging of functions and members calls.
Allow to track parameters, exceptions and performance of functions.
# Installation
Simple as `pip3 install ezlog`
# Some examples on how to use it
To log function call
```python
from ezlog.wrappers import log_call
@log_call()
def test(a, b):
print("test_fiunction_called")
return 4
test(2, "test")
```
To log class member call
```python
from ezlog.wrappers import log_member_call
class A:
@log_member_call()
def test(self, a, b, **kwargs):
print("test_called")
a=A()
a.test(2, 4, test={"d":"t", "c":"o"})
```
# Customization
Default behavior can be overriden using followin module wide parameters:
- default_log_level
Override for default logging level.
- default_performance_measure
Override default behavior for measuring performance or not.
- default_logging
Override default logger.
- default_eps
Limit for prevent spamming extremely low measurements.
- default_one_line_log
Override default logging style.
If True - log only one line (Called (args), result)
If False(default) - log in 2 lines (Calling... Done).
- default_log_arguments
Override default settings to log arguments or not.
- default_log_result
Override default settings to log function result or not.
Metadata
Release files for ezlog 0.8
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 |
|---|---|---|---|---|
| ezlog-0.8.tar.gz | 3.9 kB | Without provenance | Details for ezlog-0.8.tar.gz |
Release files / ezlog-0.8.tar.gz
| Download URL | ezlog-0.8.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
db596868825ac975ee748176a4e17df16024ef56f5cfe08be515936f58daee97
|
|
BLAKE2b-256 checksum How to use checksums |
5b8864ef0352f8fe6d911879b5e0619e49205ba2603da7b37b2594eaee2a02b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for ezlog 0.8
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.