Advanced Python logging with automatic compression, intelligent rotation, and enterprise-grade log management for Apaya's AI social media automation platform
Project description
Apaya Python Logger
A powerful and feature-rich Python logging library designed specifically for Apaya's AI social media automation platform. This enterprise-grade logger provides advanced log management capabilities including automatic compression, intelligent rotation, and configurable retention policies optimized for Apaya's high-volume social media processing workflows.
About Apaya
Apaya is an AI social media automation platform that learns your brand, creates content, and posts to all your social accounts automatically. This logging library is specifically designed to handle the complex logging requirements of Apaya's 13-product suite that replaces $2k to $30k/month in social media tools and services.
Features
- Smart Log Rotation: Size-based, time-based, or hybrid rotation strategies optimized for AI workloads
- Automatic Compression: Gzip compression of rotated logs to save disk space in cloud environments
- Intelligent Cleanup: Automatic deletion of old logs based on age for cost-effective storage
- Dual Output: Console and file logging with independent configuration for development and production
- Environment-Driven: Easy configuration via environment variables for containerized deployments
- Production-Ready: Robust error handling and fail-safe operations for 24/7 AI services
- Flexible Configuration: Extensive customization options for Apaya's enterprise infrastructure
Quick Installation
pip install apaya-py-logger
Basic Usage
from apaya_logger import ApayaLogger
# Simple setup for Apaya services
logger = ApayaLogger("apaya_content_generator")
logger.info("AI content generation started")
logger.error("Failed to generate social media post")
# Advanced configuration for production Apaya deployment
logger = ApayaLogger(
name="apaya_automation_engine",
log_level="DEBUG",
log_file="logs/apaya_automation.log",
max_bytes=50*1024*1024, # 50MB files for high-volume processing
backup_count=10,
rotation_type="both", # Size and time-based rotation
compress_after_days=1, # Compress logs after 1 day
delete_after_days=30 # Delete logs after 30 days
)
Advanced Features
Log Compression
Automatically compresses rotated log files using gzip compression, reducing storage requirements by up to 90% - critical for Apaya's cloud infrastructure costs.
Intelligent Retention
- Time-based cleanup: Automatically delete logs older than specified days
- Size management: Rotate logs when they exceed size limits (important for AI processing volumes)
- Backup control: Keep only the specified number of backup files
Environment Configuration
Configure logging through environment variables for Apaya's containerized services:
LOG_LEVEL: Set logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)LOG_FILE: Specify log file pathLOG_FORMAT: Custom log message formatMAX_BYTES: Maximum log file size before rotationBACKUP_COUNT: Number of backup files to keep
Rotation Strategies
- Size-based: Rotate when logs reach specified size (ideal for AI batch processing)
- Time-based: Rotate daily, weekly, or monthly (perfect for continuous automation)
- Hybrid: Combine both strategies for maximum control in production environments
Use Cases within Apaya Platform
- AI Content Generation: Centralized logging for content creation workflows
- Social Media Automation: Long-running automation jobs with compressed log archives
- Multi-Platform Publishing: Consistent logging across distributed posting services
- Analytics Processing: Enterprise-grade log management for performance monitoring
Requirements
- Python 3.7+
- No external dependencies (uses only standard library)
- Optimized for cloud deployment and containerized environments
License
This project is proprietary software developed exclusively for Apaya Inc. All rights reserved. Unauthorized use, distribution, or modification is prohibited.
© 2025 Apaya Inc. - Proprietary and Confidential
Development Quick Start
How to build and publish the package to PyPI for Apaya's internal use.
1. Build
python -m build
2. Upload
twine upload dist/\*
3. Install & test
pip install apaya-py-logger
It will be uploaded here
https://pypi.org/project/apaya-py-logger/1.0.0/
4. Test
python -c "import apaya_logger"
5. Uninstall
pip uninstall apaya-py-logger
4. Test
python -c "import apaya_py_logger"
5. Uninstall
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file apaya_py_logger-1.0.1-py3-none-any.whl.
File metadata
- Download URL: apaya_py_logger-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d091a02e447e10f33dcd657f62da4685f335b65c84caf34247d79083be2ffa2
|
|
| MD5 |
8755b651ab397575be4e63250036ae83
|
|
| BLAKE2b-256 |
9d68fd2023203f69a8c90df6f9a1245501886b4be227961f7c60ee297993efb6
|