Introduction
This package contains decorators that provide logging functionality for functions and methods.
Example
import logging
from log_decor import add_logger, log_msg
@add_logger()
class Example:
@log_msg('message', level=logging.DEBUG)
def f1(self):
pass
@log_msg(level=logging.INFO)
def f2(self):
pass
>>> logging.basicConfig(level=logging.DEBUG) >>> example = Example() >>> example.f1() DEBUG:Example:message >>> example.f2() INFO:Example:f2()
Release files for log-decor 2.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| log_decor-2.0.5.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| log_decor-2.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.3 kB
Release files / log_decor-2.0.5.tar.gz
| Download URL | log_decor-2.0.5.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f50f82ac75942830874050fded5142528aa5e76fdc1bd2c6f5bf2c54d947bd0d
|
|
BLAKE2b-256 checksum How to use checksums |
202039c40a4239df260659469a061505ee51e91cdca3e3874b84a96b138157b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|
Release files / log_decor-2.0.5-py3-none-any.whl
| Download URL | log_decor-2.0.5-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab044764469e960fca6b4ac235f7790e9227a7f90c9fb711f048677587177266
|
|
BLAKE2b-256 checksum How to use checksums |
87d9239e26c53c52f5c61ec8c8a874ea196c65e5d404c388a0bd3b88824985e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.3
|