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

[actions] setLogger

TAT edited this page Apr 21, 2014 · 4 revisions

setLogObject(logObject)

(1.0.0 ; deprecated since 2.1.0)

This function will be removed in a upcoming version. Use setLogger instead.



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


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