RakeBubbler is a project mainly written in Ruby, based on the MIT license.
Logging output from rakes to db
= rake-bubbler gem
This gem allows capturing raketask output along with additional information (task name, duration, start time, error) while preserving old rake behavior. Such functionality can be useful for logging and monitoring purposes.
Actions and prerequisites are captured as well.
== Configuration
Configuration should be included in Rakefile:
RakeBubbler::RakeBubbler.config do |config|
# tasks to be captured (default none)
config.tasks = ['db:migrate', 'upload']
config.executed = Proc.new do |task_name, duration, output, started, error|
puts task_name => "example_task"
puts duration => 3.0709819
puts output => "Example output\n"
puts started => Thu Nov 03 11:13:27 +0100 2011
puts error => nil
end
# additional conditions required to capture data (optional)
config.conditions = Proc.new do
[true, false][rand(2)]
end
end
=== Executed option parameters
[+task_name+] Name of the task. [+duration+] Real task duration with actions and prerequisites. [+output+] Task output captured from stdout. [+started+] Time when task execution began. [+error+] Exception captured during task execution. Nil if none.
== Contributing to rake-bubbler
== Copyright
Copyright (c) 2011 innov8on.com. See LICENSE.txt for further details.