Simple logging utility with multiIO

CAUTION

mlogger is based on logger that add some features.

Document

See RDoc in lib/mlogger.rb. To get RDoc in html format, exec 'rake doc'.

Author

Base logger

New Features

add two new features

  1. Log can be output to multiple logdev.
MLogger.new STDOUT, STDERR # Log outputs to STDOUT and STDERR
MLogger.new STDOUT, "logtest_info.log" # Log outputs to STDOUT and file
MLogger.new ["test/log/logtest_debug.log", {size:100}] # Log outputs to a file with some options
MLogger.new STDOUT, ["test/log/logtest_debug.log", {size:100}]
  1. You can output different log to different logdev
# change only one level's logdev. Of course it supports multiple logdev
@logger.change_level_logdev :debug, STDOUT, ["test/log/logtest_debug.log", {size:100}]
# change many levels's logdev. Put a +Enumerable+ as first parameter
@logger.change_level_logdev MLogger::WARN..MLogger::FATAL, STDERR, ["test/log/logtest_error.log", {size:1000}]

Install

  1. gem install mlogger
  2. Download newest master branch and run rake install

Legal notice This program is copyrighted free software by NAKAMURA, Hiroshi. You can redistribute it and/or modify it under the same terms of Ruby's license; either the dual license version in 2003, or any later version.