cujojs / meld

AOP for JS with before, around, on, afterReturning, afterThrowing, after advice, and pointcuts
Other
644 stars 65 forks source link

Simple method tracing/logging aspect #10

Closed briancavalier closed 11 years ago

briancavalier commented 11 years ago

As per #9, create a simple method/function tracing aspect that logs method invocations inc. params, and method results, either a successful return with the associated return value, or a throw with the associated exception.

Instead of logging these things directly to the console, the aspect could be configurable. It could accept a simple "receiver" API that it notifies for call, return, and throw. By default it could use a built-in receiver that simply logs to the console.

briancavalier commented 11 years ago

Not sure why this didn't auto-close, but it's closed by ab121e4a0c62a8799aee8f121b120b8a3f801760