MoosicBox Logging
Basic logging utilities with feature-gated modules for MoosicBox applications.
Overview
The MoosicBox Logging package provides:
- Feature-Gated Modules: Optional logging implementations
- Free Log Integration: Optional free_log module (requires
free_logfeature) - Logging Macros: Optional logging macro utilities (requires
macrosfeature) - Minimal Core: Lightweight base with optional extensions
Current Implementation
Core Components
- Feature-Gated Architecture: Modular logging components behind feature flags
- Free Log Module: Integration with free_log system (optional)
- Macro Module: Logging macro utilities (optional)
Available Features
free_log: Enables free_log integration modulemacros: Enables logging macro utilities
Installation
Cargo Dependencies
[]
= { = "../logging" }
# Enable specific features
= {
path = "../logging",
= ["free_log", "macros"]
}
Usage
With Free Log Feature
use *; // Free log functionality
async
With Macros Feature
use *; // Logging macros
Basic Usage
// Basic usage without features
// (minimal functionality available)
async
Implementation Notes
- The package provides minimal core functionality without features
- Logging capabilities are contained within feature-gated modules
- Free log integration requires the
free_logfeature - Logging macros require the
macrosfeature - Features can be used independently or together
Features
- Default: Minimal core (no logging functionality)
free_log: Enables free_log integration modulemacros: Enables logging macro utilities
Development Status
This package currently provides:
- Modular Architecture: Feature-gated logging components
- Free Log Integration: Optional integration with free_log system
- Macro Support: Optional logging macro utilities
- Minimal Overhead: Include only needed logging features
The actual logging implementations are contained within the feature-gated modules. Enable the appropriate features to access logging functionality.
Usage Patterns
// Feature-gated imports
use *; // Free log functions
use *; // Logging macros
// Conditional compilation based on features
This design allows consumers to include only the logging components they need, keeping the package lightweight while providing extensible logging capabilities.