
rlogview
========
This is rlogview - a simple log analyzer for log4r.
(see http://www.ruby-lang.org/en/raa-list.rhtml?name=Log4r)
rlogview is heavily inspired by chainsaw (http://logui.sourceforge.net/).
rlogview displays log messages, generated by log4r from a 
specific outputter. 

Motivation
==========
If you use logging techniques inside your application, it can be very 
usefull to keep everything as simple as possible, especially if the
application produces a lot of logentries. rlogview tries to cut down
the given logentries to make only visible what is interesting at
the moment. This is done by defining rules and filters, that are
changeable at any moment during runtime.

Requirements
============
 -log4r    (http://www.ruby-lang.org/en/raa-list.rhtml?name=Log4r)
 -ruby/gtk (ruby-gnome.sf.net) with libglade
 -romp     (rm-f.net/~cout/ruby/romp/romp.html) [optional]
 
Usage
=====
The idea is very simple: a remoteoutputter is used inside the application.
This outputter sends all logentries to a given url. At the specified url 
any arbitrary application can listen and do something useful with the given 
logentries. rlogview collects all entries and make them visible as a list.
This list is very dynamic by use of filterrules.

There are two new outputters for log4r, shipped with rlogview. 
 *DRBViewOutputter uses drb as transport media
 *ROMPViewOutputter uses romp as transport media

ROMP is a little bit faster than drb, has the advantage of asynchron 
method calls and can use unix pipes. If you don't have romp installed, you
can use DRBViewOutputter instead.

Because this outputters are not shipped by log4r they must be included 
separately by 

require "log4r/outputter/rompviewoutputter"
or
require "log4r/outputter/drbviewoutputter"

both outputter understand following arguments:

 -uri     : the url to connect to
 -buffsize: how many pending events until flush
            (a little number results in a higher nettraffic but a fluid update.
             if you do massive logging, a bigger number is good, otherwise is
             1-5 a good choice [default=1])

logger = Log4r::Logger.new("mylog")
logger.trace = true   #if you want tracing information
logger.add(Log4r::DRBViewOutputter.new("rlogview", { "uri" => "druby://:9000", "buffsize" => 5 }))

Before you start your application: start rlogview:

$> rlogview --drb 9000

This should display a window, which gets filled during run of your application.

Filter
======
There are several filter to cut down the size of displayed log entries:


 -Filter Level:    DEBUG < INFO < WARN < ERROR < FATAL
                   Justify the level to see only events with higher precedence.
 
 -Filter Category: The category is the name of the logger, that is responsible for
                   this logentry. Enter any regular expression to match only that 
                   categories, that are interesting at the moment.
                   (press return to make this filter active)
                   To delete the filter, just delete the regular expression and hit
                   return again.
 -Filter Message:  This filter acts similar to the categoryfilter for messages. 
                   The message is the logentry content.
 
All filters can be combined, ofcourse.

PLEASE NOTE: Because these are only filters, no logentry is deleted! - if you adjust
             DEBUG-level and no category or message filter, all entries get displayed!




 
  
 
