PluginContext.Logger
You can use this object instead of console.log.
Methods
logger.log(message)
messageAny - message (required)
Logs your messages.
Note
You can see logging messages inChrome Developer Toolsin the app.
You can openChrome Developer Toolsby pressing F12 in the app.
and you can also see these logging messages in console (standard output) too.
Example
'use strict';
module.exports = (pluginContext) => {
const logger = pluginContext.logger;
function startup() {
logger.log('startup');
}
function search(query, res) { ... }
function execute(id, payload) {
if (...) {
logger.log('something is being executed');
}
}
return { startup, search, execute };
};