Class: Aircana::HumanLogger
- Inherits:
-
Object
- Object
- Aircana::HumanLogger
- Defined in:
- lib/aircana/human_logger.rb
Constant Summary collapse
- EMOJIS =
Emoji mappings for different message types
{ # Core status indicators success: "✅", error: "❌", warning: "⚠️", info: "ℹ️", # Context-specific emojis file: "📁", files: "📁", agent: "🤖", network: "🌐", page: "📄", pages: "📄", search: "🔍", generation: "⚙️", # Action emojis created: "📝", stored: "💾", refresh: "🔄", install: "📦", found: "🔍", added: "➕", removed: "➖" }.freeze
- COLORS =
Color codes for terminal output
{ success: "\e[32m", # Green error: "\e[31m", # Red warning: "\e[33m", # Yellow info: "\e[36m", # Cyan reset: "\e[0m" # Reset }.freeze
Instance Method Summary collapse
- #error(message) ⇒ Object
- #info(message) ⇒ Object
-
#initialize(output = $stdout) ⇒ HumanLogger
constructor
A new instance of HumanLogger.
- #success(message) ⇒ Object
- #warn(message) ⇒ Object
Constructor Details
#initialize(output = $stdout) ⇒ HumanLogger
Returns a new instance of HumanLogger.
42 43 44 |
# File 'lib/aircana/human_logger.rb', line 42 def initialize(output = $stdout) @output = output end |
Instance Method Details
#error(message) ⇒ Object
50 51 52 |
# File 'lib/aircana/human_logger.rb', line 50 def error() log_with_emoji_and_color(:error, ) end |
#info(message) ⇒ Object
58 59 60 |
# File 'lib/aircana/human_logger.rb', line 58 def info() log_with_emoji_and_color(:info, ) end |
#success(message) ⇒ Object
46 47 48 |
# File 'lib/aircana/human_logger.rb', line 46 def success() log_with_emoji_and_color(:success, ) end |
#warn(message) ⇒ Object
54 55 56 |
# File 'lib/aircana/human_logger.rb', line 54 def warn() log_with_emoji_and_color(:warning, ) end |