slf4s
slf4s copied to clipboard
Added a logging version of Kestrel combinator
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:
-
trace
is specialized for the task of logging, whilsttap
is more general. - Instead of printing things to console,
trace
picks up an implicitLogger
instance from scope, and uses it for logging. - 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.