Skip to content
This repository has been archived by the owner on Jul 3, 2021. It is now read-only.

[actions] setLogger

TATDK edited this page Sep 15, 2014 · 4 revisions

setLogger(logObject)

(2.1.0)

Set an object to be the new logger. Requires a function under the name log.


Parameters

logObject object

Logger object


Returns

true if logger set; otherwise false


Example

// Change the logger to only write messages to console and not include the timestamp.
bot.setLogger({
    log: function() {
        var args = Array.prototype.slice.call(arguments);
        console.log.apply(console, args);
    }
});
Clone this wiki locally