log4r

A library I maintain, providing an API that closely matches that of log4j

Log4r 1.1.8 released

07 Jun 2010
Posted by colby

credit:C G-K

The 1.1.8 release of Log4r has the following changes:

  • Fix for bug #28021 - major change to how Log4r handles thread synchronization, now using Monitor class instead of directly using Mutex. Yann Golanski reported what appeared to be a deadlock related to Mutex not being re-entrant.
  • Move files from src directory to lib directory, following convential ruby gems.
  • Add %T to pattern formatting, allowing for truncated file path, this runs opposite to the c vs C patterns. e.g. %t outputs /fully/qualified/path/filename.rb, %T outputs filename.rb
  • Added example to illustrate logger inheritence rules see: examples/ancestors.rb
  • Added "levels" method to Logger
  • Incorporating STARTTLS support via Nitay Joffe wrapping change with a check for ruby < 1.8.6 to require 'smtp_tls' and handle different calling characteristics. Dan Sketcher submitted an almost identical patch a month later. Added examples/gmail.yaml and examples/gmail.rb to illustrate usage.
  • Modifications to behavior of rollingfileoutputter.rb by David Siegal. Can automatically purge older files, intelligently picks up appending where left off, or deletes existing log files and starts at the beginning again.

Other changes that I did not blog about earlier:

log4r 1.1.5 released

08 Feb 2010
Posted by colby

credit:C G-K

Now available, the 1.1.5 release of log4r (See: http://log4r.rubyforge.org or gem install -r log4r)

Addressed in 1.1.5:
FileOutputter no longer truncates files by default
Syntax fixed up in GDC/NDC classes to work in Ruby 1.9 as well as 1.8

I'm also quite happy about the move to hosting ruby gems at http://gemcutter.org. Its helped me become aware of how widely log4r is a pre-requisite for other software. Since I started new releases last September (2009), it was downloaded over 21,000 times, with the 1.1.4 release on January 12, 2010, downloaded 12,000+ times alone.

*nervous*

log4r 1.1.4 released

12 Jan 2010
Posted by colby

credit:C G-K

Now available, the 1.1.4 release of log4r (See: http://log4r.rubyforge.org or gem install -r log4r)

In this release I added code to implement Nested, Mapped and Global Diagnostic Contexts that work the same as they do in Log4j, see NDC/MDC on http://onjava.com/pub/a/onjava/2002/08/07/log4j.html?page=3 for a deeper explanation. Copied concept of GDC (global name for a program) from an older branch of log4r.

Also fixed in 1.1.4:
Logger.new was not thread safe, it is now
RollingFileOutputter created spurious non-numbered files, now fixed
Errors about null at end of yaml configuration files, now fixed