Permalink
Browse files

update readme and clean up

  • Loading branch information...
1 parent be68fdb commit 1614396c40bea7b60e0e310fae9c297920503a9d @rsanheim rsanheim committed Apr 4, 2008
Showing with 23 additions and 13 deletions.
  1. +23 −12 README.rdoc
  2. +0 −1 Rakefile
View
@@ -1,24 +1,26 @@
= 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: http://thinkrelevance.rubyforge.org/log_buddy/
-
== 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.
+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:
-== EXAMPLES:
+ obj = Object.new
+ obj.logger.debug("hi")
+ class MyClass; end
+ MyClass.logger.info("heya")
-(see also examples.rb)
+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:
a = "foo"
@a = "my var"
@@ -33,20 +35,29 @@ Call LogBuddy.init to use log_buddy. It will add two methods to object instance
d { bark } # logs "bark = woof!"
+See examples.rb for live examples you can run.
+
== REQUIREMENTS:
* Ruby 1.8.6 or JRuby (tested with 1.1RC3)
+* untested on Ruby < 1.8.6, but probably works
== 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
+== URLS
+
+* Log bugs, issues, and suggestions on Trac: http://opensource.thinkrelevance.com/wiki/log_buddy
+* View Source: http://github.com/relevance/log_buddy/tree/master
+* Git clone Source: git://github.com/relevance/log_buddy.git
+* RDocs: http://thinkrelevance.rubyforge.org/log_buddy/
+
== LICENSE:
(The MIT License)
View
@@ -21,7 +21,6 @@ Rake::RDocTask.new(:docs) do |rd|
# rd.options << '-d' if RUBY_PLATFORM !~ /win32/ and `which dot` =~ /\/dot/ and not ENV['NODOT']
rd.rdoc_dir = 'doc'
files = hoe.spec.files.grep(hoe.rdoc_pattern)
- p files
files -= ['Manifest.txt']
rd.rdoc_files.push(*files)

0 comments on commit 1614396

Please sign in to comment.