本文整理汇总了TypeScript中helpers/logger/logger.ILogger.warning方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ILogger.warning方法的具体用法?TypeScript ILogger.warning怎么用?TypeScript ILogger.warning使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类helpers/logger/logger.ILogger
的用法示例。
在下文中一共展示了ILogger.warning方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
_.each(favorites, (value: any, id: string) => {
let artist = festival.artistById[id];
if (!artist) {
this.logger.warning('No artist found with id: ' + id);
return;
}
_.each(artist.sets, (set: Set) => {
let notificationExist = _.find(notifications, notification => JSON.parse(notification.data).id === set.id);
this.logger.log('exist: ' + notificationExist + ' || ' + set.id);
// Use "real" set date to use setup notification based on device local date
let setNotificationDate = this.moment(set.start).subtract(NOTIFY_BEFORE_MIN, 'minutes');
let inFuture = setNotificationDate.isAfter(now);
this.logger.log('inFuture: ' + inFuture + ' || ' + set.start);
if (set.start && !notificationExist && inFuture) {
this.logger.log(`Adding notification for artist: ${id}, set: ${set.start}`);
this.$cordovaLocalNotification.schedule({
id: '' + this.getId(), // ID needs to be a string convertible to an integer
smallicon: 'res://drawable/ic_notification_hadra',
icon: 'res://drawable/ic_notification_hadra',
color: this.config.notificationColor,
led: this.config.notificationColor,
text: this.gettextCatalog.getString('{{name}} {{type}} set starts in 10 minutes on {{scene}} floor!', {
name: set.artist.name,
type: set.type,
scene: set.scene.name
}),
data: Set.getSerializableCopyWithId(set),
at: setNotificationDate.toDate(),
});
}
});
});