README.rdoc in loggability-0.7.0 vs README.rdoc in loggability-0.8.0.pre.65

- old
+ new

@@ -204,9 +204,39 @@ # Log everything to the same logfile Loggability.output_to( "/tmp/my_project_log.html" ) +=== Temporarily Overriding Logging Behavior + +Sometimes you want to log one particular chunk of code at a different +level, or to a different destination, and then restore everything back +to the way it was afterwards. + +Loggability has a few ways of doing that: + + # Log only fatal errors... + Loggability.with_level( :fatal ) do + ... + end + + # Log everything to an array for the block + logs = [] + Loggability.outputting_to( logs ) do + ... + end + + # Log using the HTML formatter + Loggability.formatted_with( :html ) do + ... + end + + # Or chain them together: + Loggability.with_level( :debug ).outputting_to( $stderr ).formatted_with( :color ) do + Client.connect! + end + + == Contributing You can check out the current development source with Mercurial[http://bitbucket.org/ged/loggability], or if you prefer Git, via {its Github mirror}[https://github.com/ged/loggability].