Skip to content
This repository was archived by the owner on May 21, 2021. It is now read-only.

Comments

Added a logging version of Kestrel combinator#28

Open
missingfaktor wants to merge 4 commits intow11k:masterfrom
missingfaktor:master
Open

Added a logging version of Kestrel combinator#28
missingfaktor wants to merge 4 commits intow11k:masterfrom
missingfaktor:master

Conversation

@missingfaktor
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant