clearcut-0.2.2.post0
توضیحات
A straightforward and lightweight logging and tracing library
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | clearcut-0.2.2.post0 |
| نام | clearcut |
| نسخه کتابخانه | 0.2.2.post0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Austin Howard |
| ایمیل نویسنده | austin@tangibleintelligence.com |
| آدرس صفحه اصلی | https://github.com/tangibleintelligence/clearcut |
| آدرس اینترنتی | https://pypi.org/project/clearcut/ |
| مجوز | MIT |
# Clearcut: A straightforward and lightweight logging wrapper library
[](https://cloud.drone.io/tangibleintelligence/clearcut)
This provides some helpful wrapper and util functions for logging, and formats log messages in a more human-readable way by default.
## Use
At the top of the file:
```python
from clearcut import get_logger
...
logger = get_logger(__name__)
```
Logging can be performed ad-hoc:
```python
logger.info("info log")
logger.warning("warn log", exc_info=e)
```
"log blocks" can also be created which automatically log entrance/exits as well as performance information
```python
from clearcut import log_block, get_logger
...
logger = get_logger(__name__)
...
with log_block("block name", logger):
...
```
## TODO
- Would like to use contextvars to create a contextmanager where additional "metadata" can be specified (and unspecified) which would be
included with logging automatically. (may not be import with OTLP tracing.)
- json logging
نیازمندی
| مقدار | نام |
|---|---|
| >=1.11.1,<2.0.0 | opentelemetry-api |
| >=1.11.1,<2.0.0 | opentelemetry-sdk |
| >=1.11.1,<2.0.0 | opentelemetry-exporter-otlp-proto-http |
| >=0.30b1,<0.31 | opentelemetry-instrumentation-logging |
| >=8.13.0,<9.0.0 | more-itertools |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6,<4.0 | Python |
نحوه نصب
نصب پکیج whl clearcut-0.2.2.post0:
pip install clearcut-0.2.2.post0.whl
نصب پکیج tar.gz clearcut-0.2.2.post0:
pip install clearcut-0.2.2.post0.tar.gz