本文整理汇总了TypeScript中@akala/server.logger.verbose方法的典型用法代码示例。如果您正苦于以下问题:TypeScript logger.verbose方法的具体用法?TypeScript logger.verbose怎么用?TypeScript logger.verbose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@akala/server.logger
的用法示例。
在下文中一共展示了logger.verbose方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: reject
return new Promise<any>((resolve, reject) =>
{
if (!kodi.isConnected())
{
client.$proxy().unregisterPlayer({ identity: kodiService.id, name: kodiService.name })
reject(new Error('Not connected'));
return;
}
akala.each(m.params, function (value)
{
if (value.required && typeof (params[value.name]) == 'undefined')
{
throw JSON.stringify(params) + ' is missing the required param ' + value.name + ' for ' + ns[1];
}
});
akala.logger.verbose('calling ' + i, JSON.stringify(params));
kodi.send(i as string, params, (error, result) =>
{
if (error)
reject(error);
else
resolve(result);
});
});
示例2: async
trigger: async (param) =>
{
var triggerData = akala.extend({ $date: new Date() }, param.data);
var conditionsData: PayloadDataType = null;
akala.logger.verbose(`trigger ${param.id} received`);
if (triggerMap[param.id].condition)
{
var result = interpolate(triggerMap[param.id].condition.params, triggerData);
conditionsData = await server.executeCondition({ name: triggerMap[param.id].condition.name, channel: triggerMap[param.id].condition.channel, params: { $triggerData: triggerData, ...result } });
}
akala.logger.verbose(`interpolating: ${JSON.stringify(triggerMap[param.id].action.params)}`);
akala.logger.verbose(`triggerData: ${JSON.stringify(triggerData)}`);
akala.logger.verbose(`conditionsData: ${JSON.stringify(conditionsData)}`);
await server.executeAction({ name: triggerMap[param.id].action.name, channel: triggerMap[param.id].action.channel, params: interpolate(triggerMap[param.id].action.params, { $triggerData: triggerData, $conditionsData: conditionsData }) });
},