slf4s icon indicating copy to clipboard operation
slf4s copied to clipboard

Added a logging version of Kestrel combinator

Open missingfaktor opened this issue 12 years ago • 0 comments

I have added a method Any#trace similar to Ruby's Object#tap that lets one tap into a method execution chain. The documentation for Ruby's tap can be seen here: http://ruby-doc.org/core-1.9.3/Object.html#method-i-tap.

The notable differences are:

  1. trace is specialized for the task of logging, whilst tap is more general.
  2. Instead of printing things to console, trace picks up an implicit Logger instance from scope, and uses it for logging.
  3. The default logging method used is Logger#debug. However one can very easily choose a different method by specifying so.

For more details, see the elaborate documentation in the file LoggingUtilities.scala.

Thank you, Rahul Goma Phulore.

missingfaktor avatar Mar 15 '12 19:03 missingfaktor