The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Compounding one error with another

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Daniel Berger

Posts: 1383
Nickname: djberg96
Registered: Sep, 2004

Daniel Berger is a Ruby Programmer who also dabbles in C and Perl
Compounding one error with another Posted: Aug 24, 2005 9:38 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Daniel Berger.
Original Post: Compounding one error with another
Feed Title: Testing 1,2,3...
Feed URL: http://djberg96.livejournal.com/data/rss
Feed Description: A blog on Ruby and other stuff.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Daniel Berger
Latest Posts From Testing 1,2,3...

Advertisement
Zed Shaw went on a rant last night as a result of some code he found in the glue package, and rightfully so. Modifying a stock class in the stdlib is bad enough, but not even documenting the change is inexcusable.

The original issue seems to stem from the fact that the Logger class doesn't allow you to change the format of the message layout, except for the date/time format. Obviously, this is an issue that can and should be resolved in the Logger class itself via a patch to NaHi. Even if you can't wait for a patch the solution is, as Zed suggests, to subclass and deal with it in your own class. You do NOT screw with the existing class, precisely because it might cause side effects. Just the sort of side effects that Zed ran into.

As we speak I'm pouring over the logger.rb file, adding Nicholas Seckar's proposed change, and tweaking a few other things as I go. Nothing too radical, though I am going to propose a "Log" toplevel namespace for this and most of the other logging packages.

Anyway, a big slap on the wrist for the glue authors. No cookie for you.

Read: Compounding one error with another

Topic: David Geary Wows the Crowd with Rails Previous Topic   Next Topic Topic: Ruby and Konfabulator Part 2

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use