Module: mixinLog

Bestow logging powers.
Parameters:
Name Type Attributes Description
object object The object to bestow logging powers to
prefix string <optional>
Prefix log messages with this
Source:
Returns:
Return the object passed in
Type
object

Methods

(inner) log(*args)

Logs a message or object.

There are a few options available for the log mixin. Imagine an object foo with this function mixed in:

var foo = {};
Twilio.mixinLog(foo);

To enable or disable the log: foo.log.enabled = true

To modify the prefix: foo.log.prefix = 'Hello'

To use a custom callback instead of console.log: foo.log.handler = function() { ... };

Parameters:
Name Type Description
*args Messages or objects to be logged
Source: