Metadata-Version: 2.1
Name: logease
Version: 0.1.0
Summary: A Python logging library designed to replace traditional logging mechanisms using decorators and modules.
Home-page: https://github.com/Latrodect/Logease
Author: Bahadir Nural
Author-email: bahadir.nural@outlook.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: colorlog
Requires-Dist: pysnmp


### Logease

**Logease** is a lightweight Python library designed to simplify and enhance logging by eliminating the need for traditional loggers. With  **Logease** , you can effortlessly integrate logging into your applications using decorators and modules. The library leverages the Singleton pattern to ensure that your logging system is efficient, centralized, and easy to manage.

---

#### Key Features:

* **Singleton Logger** : Initialize your logger once and use it throughout your application.
* **Decorator Support** : Easily add logging to your functions with the `@log_wrapper` decorator.
* **Modular Design** : Use the `Logger` module to customize and extend logging capabilities as needed.
* **Minimalist Approach** : Focus on your code, not the logging implementation.

---

**Logease** aims to streamline the logging process, making it more intuitive and less intrusive. Say goodbye to the clutter of traditional loggers and embrace a cleaner, more modern approach with  **Logease** .


## Usage

### Basic Example

```
from logease.decorators import log_wrapper
from logease.modules import Logger

# Initialize the logger (singleton pattern)
logger = Logger()

@log_wrapper
def example_function(param):
    # Function logic here
    return f"Received {param}"

if __name__ == "__main__":
    logger.info("Starting application...")
    result = example_function("Logease")
    logger.info(f"Result: {result}")
    logger.info("Application finished.")


```


### Customizing the Logger

You can customize the logger by passing configurations to the `Logger` module:

```
from logease.modules import Logger

# Custom logger with specific settings
logger = Logger(level="DEBUG", format="%(asctime)s - %(levelname)s - %(message)s")

logger.debug("This is a debug message")

```


### Using the Decorator

The `@log_wrapper` decorator automatically logs the entry, exit, and execution time of functions:

```
from logease.decorators import log_wrapper

@log_wrapper
def complex_calculation(x, y):
    # Complex calculations here
    return x + y

result = complex_calculation(10, 20)

```


## Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.
