Project

blabber

0.0
No commit activity in last 3 years
No release in over 3 years
Redirect console messages to other places.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Blabber

Blabber helps us monitor long running jobs without having to watch them in the terminal.

Build Status

Installation

$ gem install blabber

Example

require "blabber"
require 'blabber/channel'
  
class CustomConsole

  include Blabber::Channel
  attr_reader :opts

  def initialize(opts)
    @opts = opts
  end

  def loglevels
    @opts['loglevels']
  end

  def speak(message, loglevel, opts)
    puts "[#{loglevel}] #{message}"
  end

end

all_standard_loglevels = ['INFO', 'WARN', 'ERROR', 'DEBUG']

blabber = Blabber::Blabber.new([
    {'channel' => 'Blabber::Console', 'loglevels' => all_standard_loglevels},
    {'channel' => 'CustomConsole', 'loglevels' => ['INFO', 'WARN', 'ERROR', 'PLATYPUS']}
])

blabber.debug("debug msg")
blabber.info("info msg")
blabber.error("error msg")
blabber.warn("warn msg")
blabber.debug("multiline\nmessage")
blabber.platypus("just to custom console")

Channels

Credits

@benfollis