Every repository with this icon (
Every repository with this icon (
Run the following if you haven't already:
gem sources -a http://gems.github.com
Install the gem(s):
sudo gem install relevance-log_buddy
tree 99aeb1770e404b7f2eee2b6c09e51f2b1b4680c7
parent c00ac20a835b3eb56a140feb7ccae4063c908bf7
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Fri Apr 04 06:46:52 -0700 2008 | [rsanheim] |
| |
History.txt | Fri Apr 04 06:26:53 -0700 2008 | [rsanheim] |
| |
Manifest.txt | Fri Apr 04 06:26:53 -0700 2008 | [rsanheim] |
| |
README.rdoc | Fri Apr 04 06:45:34 -0700 2008 | [rsanheim] |
| |
Rakefile | Fri Apr 04 06:26:53 -0700 2008 | [rsanheim] |
| |
bin/ | Fri Apr 04 06:26:53 -0700 2008 | [rsanheim] |
| |
examples.rb | Fri Apr 04 06:26:53 -0700 2008 | [rsanheim] |
| |
init.rb | Fri Apr 04 06:26:53 -0700 2008 | [rsanheim] |
| |
lib/ | Fri Apr 04 06:26:53 -0700 2008 | [rsanheim] |
| |
test.log | Fri Apr 04 06:26:53 -0700 2008 | [rsanheim] |
| |
test/ | Fri Apr 04 06:26:53 -0700 2008 | [rsanheim] |
LogBuddy
- 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:
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".
- The "logger" method is just a typical logger - it will use the Rails logger if its available.
- The "d" method is a special helper 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:
(see also examples.rb)
a = "foo"
@a = "my var"
@@bar = "class var!"
def bark
"woof!"
end
d { a } # logs "a = 'foo'"
d { @a } # logs "@a = 'my var'"
d { @@bar } # logs "@@bar = 'class var!'"
d { bark } # logs "bark = woof!"
REQUIREMENTS:
- Ruby 1.8.6 or JRuby (tested with 1.1RC3)
ISSUES
- Be careful you don’t depend on methods that log_buddy adds to Object in production!
- This is meant for non-production use while developing and testing —> it does stuff that is slow and you probably don’t want happening in your production environment.
- Don’t even try using this in irb.
INSTALL:
- sudo gem log_buddy
LICENSE:
(The MIT License)
Copyright © 2008 Relevance, Inc. - http://thinkrelevance.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.




