CPRL π§π¬
CPRL (Console Print with Rich Logs) is a Ruby gem that displays log messages in the console using colors and emojis.
Accessible from models, controllers, views, Rails console, and scripts.
π Installation
gem 'cprl'
π‘ Usage
cprl.info("βΉοΈ Informational")
cprl.ok("β
Success")
cprl.error("β Something went wrong")
cprl.sql("π Executing SQL")
Works in:
- Rails controllers
- Models
- Views
- Rails console
- Standalone scripts
π οΈ Configuration
Cprl. = true # Adds timestamp to messages
Cprl.silent = false # Disable console output
Cprl.colors = true # Enable/disable ANSI colors
Cprl.log_to_file = true # Enable file logging
Cprl.log_file_path = "log/cprl.log"
π License
MIT
β Author
Govani SΓ‘nchez OrduΓ±a