Metadata-Version: 2.4
Name: detaylog
Version: 1.0.2
Summary: A minimalist, colorful, and zero-dependency logging library for Python.
Home-page: https://pypi.org/project/detaylog/
Author: Yunus Emre
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python
Dynamic: summary

# DetayLog

A minimalist, colorful, and zero-dependency logging library for Python.

---

## Key Features

-  **Colorized Console Output**: Distinct ANSI colors for each log level (INFO, SUCCESS, WARNING, ERROR, CRITICAL).
-  **Automatic File Logging**: Saves logs to a specified file with precise timestamps.
-  **Location Tracking**: Automatically identifies and logs the source filename and line number (`[file.py:line]`).
-  **Zero External Dependencies**: Built entirely with pure Python standard library modules (`datetime`, `os`, `inspect`, `traceback`).
-  **Exception Handling**: Log complete stack traces effortlessly using `log.exception()`.

---

## Installation

Install the package directly via `pip`:

pip install detaylog

---

## Quick Start & Usage

from detaylog import DetayLog

# Initialize the logger
log = DetayLog(log_file="app.log", show_location=True)

# Log messages with different severity levels
log.info("System starting up...")
log.success("Database connection established!")
log.warning("User entered incorrect password.")
log.error("Server unresponsive.")
log.critical("System memory critically high at 99%!")

# Automatic Exception Logging (Traceback)
try:
    result = 10 / 0
except Exception:
    log.exception("An unexpected math error occurred!")

---

## Configuration Options

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `log_file` | `str` | `"app.log"` | Target path for saving log output files. |
| `write_to_file` | `bool` | `True` | Toggle writing log outputs to a file. |
| `show_location` | `bool` | `True` | Toggle displaying `[filename:line]` location data. |

---

## License

Distributed under the **Apache License 2.0**. See the [LICENSE](LICENSE) file for details.
