Metadata-Version: 2.1
Name: quirtylog
Version: 0.2.0
Author-email: agdiiura <andreadiiura@gmail.com>
License: MIT License
        
        Copyright (c) 2023 quirtylog
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: AUTHORS.rst
Requires-Dist: coloredlogs>=10.0
Requires-Dist: joblib>=1.3.2
Requires-Dist: pandas>=2.1.4
Requires-Dist: PyYAML>=6.0.1
Requires-Dist: requests>=2.18.4
Requires-Dist: tqdm>=4.66.1
Provides-Extra: build
Requires-Dist: ruff>=0.2.0; extra == "build"
Requires-Dist: colorama>=0.4.6; extra == "build"
Requires-Dist: coverage>=7.0; extra == "build"
Requires-Dist: isort>=5.12.0; extra == "build"
Requires-Dist: pre-commit>=3.3.0; extra == "build"
Requires-Dist: setuptools-git-versioning>=1.13.4; extra == "build"
Requires-Dist: xmlrunner>=1.7.7; extra == "build"
Provides-Extra: docs
Requires-Dist: GitPython>=3.1.3; extra == "docs"
Requires-Dist: recommonmark>=0.5.0; extra == "docs"
Requires-Dist: requests>=2.23.0; extra == "docs"
Requires-Dist: Sphinx==7.2.6; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints>=1.20.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=2.0.0; extra == "docs"

![Alt text](logo.png?raw=true "Title")

# ⚡ quirtylog ⚡


[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)

Quick & dirty logging in python.


The file `requirements.txt` contains the packages needed for the installation.
The code requires `python3.11+`.

### Installation
To install the package the simplest procedure is:
```bash
pip install quirtylog
```
Now you can test the installation... In a python shell:

```python
import quirtylog

quirtylog.__version__
```

#### Installation from source
Once you have cloned the repository
```bash
pip install .
```
To use the develop mode just write `pip install -e .`.


### Examples
The package creates custom loggers object.

```python
import quirtylog

log_path = "/path/to/logs"
logger = quirtylog.create_logger(log_path=log_path)
```
It is also possible to create decorators to be
used in a user-defined function.

```python
import quirtylog


@quirtylog.measure_time(logger)
def f(x):
    """A function that do nothing"""
    return x


@quirtylog.measure_time(logger)
def g(x):
    """A function that raise an exception"""
    return x / 0.
```

For further examples see the folder [`examples`](examples).

### Contributing
If you want to contribute to this project, please follow the guidelines in the [CONTRIBUTING.md](CONTRIBUTING.md).

### Official soundtrack
[Jhonny Cash - The Frozen Logger](https://www.youtube.com/watch?v=KUfzDIKGkQI)
