Skip to content
Merged
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.2.2] - 2026-03-17

### Added
- `LOG_LEVEL_DEBUG`, `LOG_LEVEL_INFO`, `LOG_LEVEL_WARNING`, `LOG_LEVEL_ERROR`, and `LOG_LEVEL_CRITICAL` named constants exported from the top-level package, replacing bare integer literals throughout the API.
- `AsyncLogger.close()` method for an explicit per-instance best-effort flush before discarding an async logger.
- `CONTRIBUTING.md` with setup, testing, style, and pull-request guidelines (the README linked to this file but it was previously missing).

### Changed
- `shutdown_async_logging` is now registered with `atexit` so buffered async messages are flushed when the interpreter exits rather than being silently dropped.
- `shutdown_async_logging()` now drains the queue via a `None` sentinel and waits for the background worker to finish before returning, ensuring pending messages are processed.
- `AsyncLogger.flush()` and `AsyncLogger.close()` now use a deterministic synchronization barrier (`_FlushSignal`) so callers block until all preceding messages are fully written, replacing the previous timing-based best-effort approach.
- Removed legacy root-level `__init__.py` that shadowed the `kakashi/` package in editable installs.
- Removed `setup.py`; `pyproject.toml` is now the single canonical build configuration.

### Fixed
- README license text corrected from MIT to LGPL-2.1, matching the `LICENSE` file and packaging metadata.

## [0.2.1] - 2026-02-05

### Changed
Expand Down
42 changes: 42 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Contributing to Kakashi

Thank you for your interest in contributing! The following guidelines will help you get started.

## Reporting Issues

- Search [existing issues](https://github.com/IntegerAlex/kakashi/issues) before opening a new one.
- Include a minimal, reproducible example and your Python version when reporting bugs.

## Development Setup

```bash
# Clone the repository
git clone https://github.com/IntegerAlex/kakashi.git
cd kakashi

# Install with development dependencies
pip install -e ".[dev]"
```

## Running Tests

```bash
pytest
```

## Code Style

- Format code with [black](https://black.readthedocs.io/): `black .`
- Lint with [flake8](https://flake8.pycqa.org/): `flake8 kakashi/`
- Type-check with [mypy](https://mypy.readthedocs.io/): `mypy kakashi/`

## Submitting a Pull Request

1. Fork the repository and create a feature branch from `main`.
2. Write tests for any new functionality.
3. Ensure all tests, lint, and type checks pass.
4. Open a pull request with a clear description of the change.

## License

By contributing you agree that your code will be released under the project's [LGPL-2.1 license](LICENSE).
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) f

## 📄 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
This project is licensed under the GNU Lesser General Public License v2.1 (LGPL-2.1) - see the [LICENSE](LICENSE) file for details.

## ⚖️ Legal Disclaimers

Expand Down
12 changes: 0 additions & 12 deletions __init__.py

This file was deleted.

32 changes: 27 additions & 5 deletions kakashi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,18 @@

# Main logger classes and entry points
from .core.logger import (
Logger, AsyncLogger, LogFormatter,
get_logger, get_async_logger, clear_logger_cache,
shutdown_async_logging
Logger,
AsyncLogger,
LogFormatter,
get_logger,
get_async_logger,
clear_logger_cache,
shutdown_async_logging,
LOG_LEVEL_DEBUG,
LOG_LEVEL_INFO,
LOG_LEVEL_WARNING,
LOG_LEVEL_ERROR,
LOG_LEVEL_CRITICAL,
)

# ============================================================================
Expand Down Expand Up @@ -81,11 +90,15 @@
# VERSION AND METADATA
# ============================================================================

__version__ = "2.0.0"
__version__ = "0.2.2"
__author__ = "Kakashi Development Team"
__description__ = "Professional High-Performance Logging Library"
__url__ = "https://github.com/kakashi/logging"

# Backward-compatible aliases for callers using `kakashi.version`/`kakashi.author`.
version = __version__
author = __author__

# ============================================================================
# MAIN EXPORTS
# ============================================================================
Expand All @@ -99,6 +112,13 @@
"get_async_logger", # Async logger entry point
"clear_logger_cache",
"shutdown_async_logging",

# ---- LOG LEVEL CONSTANTS ----
"LOG_LEVEL_DEBUG",
"LOG_LEVEL_INFO",
"LOG_LEVEL_WARNING",
"LOG_LEVEL_ERROR",
"LOG_LEVEL_CRITICAL",

# ---- CORE DATA STRUCTURES ----
"LogRecord",
Expand Down Expand Up @@ -135,6 +155,8 @@
# ---- VERSION AND METADATA ----
"__version__",
"__author__",
"version",
"author",
"__description__",
"__url__",
]
]
Loading
Loading