Metadata-Version: 2.2
Name: tamga
Version: 0.1.2
Summary: A modern, async-capable logging utility with multiple output formats and colorful console output
Home-page: https://github.com/dogukanurker/tamga
Author: Doğukan Ürker
Author-email: dogukanurker@icloud.com
Keywords: logging,async,mongodb,colorful,console,file,json,sql,email
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: System :: Logging
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiofiles>=0.8.0
Requires-Dist: aiosqlite>=0.17.0
Requires-Dist: motor>=3.0.0
Requires-Dist: aiohttp>=3.8.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: pymongo[srv]>=4.6.1
Requires-Dist: bson>=0.5.10
Requires-Dist: requests>=2.31.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Tamga

A modern, async-capable logging utility for Python with multiple output formats and colorful console output.

## Features

- 🎨 Colorful console output using Tailwind CSS color palette
- 📁 File logging with rotation and backup
- 📊 JSON logging with size limits and backup
- 🗄️ SQLite database logging
- 🚀 MongoDB integration
- 📧 Email notifications for specific log levels
- 🌐 API logging support
- ⚡ Async/await support
- 🔄 Automatic file rotation and backup
- 🎯 Multiple log levels with customizable colors

## Installation

```bash
pip install tamga
```

## Quick Start

```python
from tamga import Tamga

# Initialize the logger
logger = Tamga(
    logToFile=True,
    logToJSON=True,
    logToConsole=True
)

# Basic logging
logger.info("This is an info message")
logger.warning("This is a warning")
logger.error("This is an error")
logger.success("This is a success message")
logger.debug("This is a debug message")
logger.critical("This is a critical message")

# Custom logging
logger.custom("This is a custom message", "CUSTOM", "orange")
```

## Advanced Usage

### MongoDB Integration

```python
logger = Tamga(
    logToMongo=True,
    mongoURI="your_mongodb_uri",
    mongoDatabaseName="logs_db",
    mongoCollectionName="application_logs"
)
```

### Email Notifications

```python
logger = Tamga(
    sendMail=True,
    smtpServer="smtp.gmail.com",
    smtpPort=587,
    smtpMail="your_email@gmail.com",
    smtpPassword="your_password",
    smtpReceivers=["receiver@email.com"],
    mailLevels=["CRITICAL", "ERROR"]
)
```

### File Rotation and Backup

```python
logger = Tamga(
    logToFile=True,
    logToJSON=True,
    maxLogSize=10,  # MB
    maxJsonSize=10,  # MB
    enableBackup=True
)
```

### API Integration

```python
logger = Tamga(
    logToAPI=True,
    apiURL="http://your-api.com/logs"
)
```

## Available Log Levels

- INFO (sky blue)
- WARNING (amber)
- ERROR (rose)
- SUCCESS (emerald)
- DEBUG (indigo)
- CRITICAL (red)
- DATABASE (green)
- MAIL (neutral)
- METRIC (cyan)
- TRACE (gray)
- Custom (user-defined)

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Author

- Doğukan Ürker
- Email: dogukanurker@icloud.com
- GitHub: [@dogukanurker](https://github.com/dogukanurker) 
