[BioRuby] BioRuby and log4r

Pjotr Prins pjotr.public14 at thebird.nl
Fri Jan 7 08:52:21 UTC 2011


I am creating a plugin 'bio-logger' for sane handling of errors and
exceptions in different situations (log-act):

* Normal user
* Developer
* Web server
* Fault-tolerant systems

One example is a program logs a warning to stdout, as a user, but
raises an exception, as a developer.

bio-logger builds up on log4r functionality, using a more fine-grained
approach for logging errors. I.e. within 'debug', 'info', 'warn',
'error' an addition value 1..10 can be set to limit output and
logging.

When a program, e.g. gff3-fetch, supports bio-logger switches, the following 
is possible:

  --logger stderr              Add stderr logger (default is stdout)
  --logger filen               Add filename logger
  --trace  debug               Show all messages 
  --trace  warn                Show messages more serious than 'warn'
  --trace  warn:3              Show messaged more serious that 'warn' level 3

module overrides:

  --trace  gff3:info:5         Override level for 'gff3' to info level 5
  --trace  blast:debug         Override level for 'blast'
  --trace  blast,gff3:debug    Override level for 'blast' and 'gff3' 
  --trace  stderr:blast:debug  Override level for 'blast' on stderr 

Also behaviour can be changed. This normally happens through library 
calls. There is one command line switch, which changes log-act:

  --log-act Developer          Modify the logger for development

log4r supports rotating logs and remote logging. Which will be
available.

Any comments?

Pj.

On Sun, Jan 02, 2011 at 07:49:58PM +0100, Pjotr Prins wrote:
>   http://log4r.rubyforge.org/manual.html



More information about the BioRuby mailing list