本文整理匯總了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(),
});
}
});
});