PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > [ANN] log_buddy released - your ful dev and debug buddy
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
[ANN] log_buddy released - your ful dev and debug buddy

Réponse
 
LinkBack Outils de la discussion
Vieux 31/03/2008, 05h47   #1
Rob Sanheim
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut [ANN] log_buddy released - your ful dev and debug buddy

LogBuddy is your friendly little log buddy at your side, ing you
dev, debug, and test. It plays well with Rails and plain old Ruby
projects. To use it, sudo gem install log_buddy, then require
'log_buddy' and call LogBuddy.init. It will add two methods to object
instance and class level: "d" and "logger". You probably only want to
use these in non-prod environments, so conditionally load it based on
your test env.

The "logger" method is just a typical logger - it will use the Rails
logger if its available.
The "d" method is a special er that will output the code in the
block and its result - note that you *must* use the bracket block form
- do...end is not supported.

Examples
=======

require 'lib/log_buddy'
LogBuddy.init
a = "foo"
@a = "my var"
@@bar = "class var!"
def bark
"woof!"
end

module Foo;
def self.module_method
"hi!!"
end
end

d { a } # logs "a = 'foo'"
d { @a } # logs "@a = 'my var'"
d { @@bar } # logs "@@bar = 'class var!'"
d { bark } # logs "bark = woof!"
d { Foo::module_method } # logs Foo::module_method = 'hi!!'

More
====
Log bugs/issues/suggestions here:
http://opensource.thinkrelevance.com/wiki/log_buddy
Source: http://github.com/relevance/log_buddy/tree/master
git clone git://github.com/relevance/log_buddy.git
rdocs: http://thinkrelevance.rubyforge.org/log_buddy/

Thanks
======
Thanks to Dave Thomas and his latest testing code for the idea of
simple reading the file based on the call stack to easily output the
log line.
Thanks to Muness Alrubaie for pairing.

- Rob

http://robsanheim.com
http://thinkrelevance.com

  Réponse avec citation
Vieux 31/03/2008, 06h56   #2
Joel VanderWerf
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [ANN] log_buddy released - your ful dev and debug buddy

Chad Perrin wrote:
> The growing ubiquity of all administrative commands being explained with
> a "sudo" at the front, as if everyone in the world uses sudo for all
> administrative commands, is getting kinda old.
>
> 1. Some people use MS Windows.
>
> 2. Some people use MacOS X.
>
> 3. Some people use su or just login as root from the TTY console.
>
> The common thread here is that not everyone in the world is using Ubuntu.


4. Some people use ubuntu, but chown -R /usr/local to their own user.
(On my laptop, anyway!) Never have to "sudo gem".

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

  Réponse avec citation
Vieux 31/03/2008, 07h21   #3
Jeremy McAnally
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [ANN] log_buddy released - your ful dev and debug buddy

Erm, Mac OS X uses sudo...

--Jeremy

On Mon, Mar 31, 2008 at 12:41 AM, Chad Perrin <perrin@apotheon.com> wrote:
> On Mon, Mar 31, 2008 at 12:47:20PM +0900, Rob Sanheim wrote:
> > LogBuddy is your friendly little log buddy at your side, ing you
> > dev, debug, and test. It plays well with Rails and plain old Ruby
> > projects. To use it, sudo gem install log_buddy, then require
> > 'log_buddy' and call LogBuddy.init. It will add two methods to object
> > instance and class level: "d" and "logger". You probably only want to
> > use these in non-prod environments, so conditionally load it based on
> > your test env.

>
> The growing ubiquity of all administrative commands being explained with
> a "sudo" at the front, as if everyone in the world uses sudo for all
> administrative commands, is getting kinda old.
>
> 1. Some people use MS Windows.
>
> 2. Some people use MacOS X.
>
> 3. Some people use su or just login as root from the TTY console.
>
> The common thread here is that not everyone in the world is using Ubuntu.
>
> . . . but LogBuddy looks interesting. I might have to give that a whirl
> in the near future. Thanks.
>
> --
> CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
> Thomas McCauley: "The measure of a man's real character is what he would do
> if he knew he would never be found out."
>




--
http://jeremymcanally.com/
http://entp.com

Read my books:
Ruby in Practice (http://manning.com/mcanally/)
My free Ruby e-book (http://humblelittlerubybook.com/)

Or, my blogs:
http://mrneighborly.com
http://rubyinpractice.com

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 13h45.


Édité par : vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09447 seconds with 11 queries