0.0
The project is in a healthy, maintained state
Foghorn provides colored console output with optional dual-write to a plain-text log file. Built for CLI tools that need beautiful terminal output and persistent logs without the complexity of enterprise logging.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

~> 3.1
 Project Readme

🌫️ Foghorn

A readable, terminal-friendly logger for Ruby!

Foghorn gives you colored console output with optional dual-write to a plain-text log file. No monkey-patching, no enterprise bloat — just clear signals through the noise.

Installation

Add to your Gemfile:

gem 'foghorn'

Usage

require 'foghorn'

Foghorn.info "Deploying to production..."
Foghorn.success "All services healthy"
Foghorn.warn "Memory at 72%"
Foghorn.error "Connection refused"
Foghorn.debug "Checking state..."    # only shown at debug level
Foghorn.verbose "Detailed output..."  # shown at verbose or debug level

Log Levels

Foghorn.level = :quiet   # errors only
Foghorn.level = :normal  # info, success, warn, error (default)
Foghorn.level = :verbose # adds verbose messages
Foghorn.level = :debug   # adds debug messages

File Logging

Dual-write to terminal (with color) and a plain-text log file (without color):

Foghorn.enable_file_logging('production')
# => Creates ./logs/production-20260218-183000.log

# Custom log directory
Foghorn.enable_file_logging('myapp', log_dir: '/var/log/myapp')

# Close when done
Foghorn.close_log

Development

bundle install
rake test     # lint + specs
rake build    # build the gem
rake release  # lint, test, bump, tag

License

MIT