# \[ANN} log\_buddy 0.0.2 released

**URL:** <https://www.ruby-forum.com/t/ann-log-buddy-0-0-2-released/133919>\
**Category:** Rails\
**Created:** [April 4, 2008, 11:27pm UTC](https://www.ruby-forum.com/t/ann-log-buddy-0-0-2-released/133919 "2008-04-04T23:27:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsanheim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/47e85d/32.png) [@rsanheim](https://www.ruby-forum.com/u/rsanheim)\
**Post date:** [April 4, 2008, 11:27pm UTC](https://www.ruby-forum.com/t/ann-log-buddy-0-0-2-released/133919/1 "2008-04-04T23:27:41Z")

</div>

## DESCRIPTION:

log\_buddy is your friendly little log buddy at your side, helping you  
dev, debug, and test.

## SYNOPSIS:

Call LogBuddy.init to use log\_buddy. It will add two methods to  
object instance and class level: “d” and “logger”. You can  
use your own logger with Logbuddy by passing it into init’s options  
hash:

```
LogBuddy.init :default_logger => Logger.new('my_log.log')

```

Now you have your logger available from any object, at the instance  
level and class level:

```
obj = Object.new
obj.logger.debug("hi")
class MyClass; end
MyClass.logger.info("heya")

```

You also have a method called “d” (for “debug”) on any object, which  
is used for quick debugging and logging of things while you are  
developing.  
Its especially useful while using autotest. When you call the “d”  
method with an inline block, it will log the name of the things  
in the block and the result. Examples:

Changes:

### 0.0.2

- rdocs
- support for multiple statements in one “d” call separated by  
semicolons

thanks,  
Rob

> **[Home](https://robsanheim.com/)**
>
> Just another WordPress site

> **[Cognitect, a Nu Holdings, Ltd. Company](https://cognitect.com/)**
