proxy-debug-logger
v1.2.0
Published
proxy logger
Downloads
3
Readme
ProxyDebugLogger
Factory to create proxy that log any method call. For debug.
Install
npm install proxy-debug-logger
Usage
import { traceMethodCalls } from 'proxy-debug-logger';
const originalObject ={
doSomething(){},
compute(value){
return value * 2;
}
}
const wrapped = traceMethodCalls(originalObject, "object-1");
wrapped.doSomething("with this");
wrapped.compute(13);
Log result
object-1 doSomething["with this"] -> undefined
object-1 compute[13] -> 26