Metadata-Version: 2.1
Name: clearcut
Version: 0.2.1
Summary: A straightforward and lightweight logging and tracing library
Home-page: https://github.com/tangibleintelligence/clearcut
License: MIT
Keywords: logging,tracing,opentelemetry
Author: Austin Howard
Author-email: austin@tangibleintelligence.com
Requires-Python: >=3.6,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: opentelemetry-api (>=1.11.1,<2.0.0)
Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.11.1,<2.0.0)
Requires-Dist: opentelemetry-instrumentation-logging (>=0.30b1,<0.31)
Requires-Dist: opentelemetry-sdk (>=1.11.1,<2.0.0)
Project-URL: Repository, https://github.com/tangibleintelligence/clearcut
Description-Content-Type: text/markdown

# Clearcut: A straightforward and lightweight logging wrapper library

[![Build Status](https://cloud.drone.io/api/badges/tangibleintelligence/clearcut/status.svg)](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
