elsewhere
Version:
A node project that aims to replicate the functionality of the Google Social Graph API
10 lines (8 loc) • 715 B
HTML
<p>Elsewhere uses a simple logging system that writes to Node’s console. You can replace the logger with your own, for example, to store warnings and errors in a database or log file. To add your own custom logger, all you need to do is provide an object with the following interface:</p>
<pre><code>{
info: function (message) { /* code to pass on message */ },
log: function (message) { /* code to pass on message */ },
warn: function (message) { /* code to pass on message */ },
error: function (message) { /* code to pass on message */ }
}</code></pre>
<p>You must then add this object to the <code>logger</code> property of the options object passed into the <code>graph()</code> method.</p>