**Release Date:** Aug 25, 2024
**Compatibility:** OS Independent (Works across all major operating systems)
**Minimum Requirements:** Python 3.6
Overview
The first official release of RsLogMod brings a comprehensive logging solution designed for flexibility, ease of use, and robust configuration management. RsLogMod is built to handle various logging needs with features like log rotation, customizable log paths, and log levels, ensuring your logging is both efficient and effective.
Key Features
1. **Configuration Management**
- **Display Current Configuration:** Easily view your current settings using `Configure.display()`.
- **Set Log Folder Path:** Customize where your logs are stored with `Configure.set_log_folder_path('target/path')`.
- **Set Maximum Log File Size:** Control the size of your log files with `Configure.set_log_file_max_size(50)`. The default size is 50MB.
- **Enable/Disable Log Rotation:** Manage log rotation with `Configure.enable_log_rotation(True)`, keeping your log files organized and within the desired size.
2. **Default Behaviors:**
- **Log to Terminal Only:** By default, if no log folder path is set, RsLogMod will output logs directly to the terminal, avoiding file creation unless you specify a path.
- **Log Rotation:** Log rotation is enabled by default, with a 50MB maximum file size. Logs will automatically rotate when they reach this limit.
- **Verbose Parameter:** The `rlog` function includes a `verbose` parameter (`rlog(verbose=True)`), which, when set to `True`, outputs logs to the terminal instead of a file, ideal for immediate attention and critical errors.
3. **Improved Log Handling**
- The `rlog` function is designed to ensure logs are written efficiently, with built-in handling for log rotation and proper formatting based on your configuration settings.
- **Configuration Persistence:** All changes to settings, such as log paths and sizes, are saved and persist across sessions, ensuring a consistent logging experience.
Example Log Output
Below is an example of how the logging output appears with the default setup:
plaintext
[INFO] 2024-08-25 13:20: Program Started
[ERROR] 2024-08-25 13:23: Failed to send push notification: Connection Timeout
[CRITICAL] 2024-08-25 13:25: Unable to load configuration file: FileNotFoundError
How to Install
To install RsLogMod, simply use pip:
bash
pip install RsLogMod
Documentation
For detailed information on configuring and using RsLogMod, please refer to the [README](https://github.com/D-3-X/RsLogMod#rslogmod).