0.0.3 • Published 11 years ago
log-calls v0.0.3
log-calls.js
Log function calls.
Installation
Download the latest release via git from github:
git clone https://github.com/sttts/log-calls.gitor use npm:
npm install log-callsor use gittio for Titanium:
gittio install log-callsUsage
To use log-calls.js, require it in your code (probably in some initialization code) and annotate a single function or a whole namespace, e.g. a CommonJS module:
var log_calls = require('log-calls');
var nedb = require('nedb');
log_calls.annotate_all('nedb', nedb);
var mymodule = require('mymodule');
log_calls.annotate('mymodule', mymodule, 'some_function', console.error);
// ... your codeTitanium
To use log-call.js on the Titanium platform, pass one of the logger functions from Ti.API:
var log_calls = require('log-calls');
var nedb = require('nedb');
log_calls.annotate_all('nedb', nedb, Ti.API.info);Output
The output looks like this:
nedb.find({"ignore":false})
nedb.getCandidates({"ignore":false})
mymodule.some_function(42);