Maul
Maul. It splits logs. Get it?
Install
Clone this repository, then rake install
should work. If not, try
it step-by-step:
gem build maul.gemspec
gem install maul-0.1.0.gem
Usage
This example writes each line from stdin to a file
whose name is determined from the first token in the
line up to the first comma.
class MyMauler < Maul
def to_file line
# this method should return the name of the file
# where this line should get written
# or nil for this line to be ignored
line.split(",").first + ".log"
end
end
mauler = MyMauler.new
while line = STDIN.gets
maul.on line
end