Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2019-07-04 18:13:46 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2019-07-04 18:13:46 +0300
commit4e7ffe704f91c90a8d248832ad149621b47be089 (patch)
tree8fd46fcfbc465d4c265c0b9d0943e735ec6314db /src
parentaca9da34209cb67d288ecc39a2dcb89bbedeba9b (diff)
Use nextcloud-logger for services
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'src')
-rw-r--r--src/service/DAVService.js7
-rw-r--r--src/service/NotificationService.js10
2 files changed, 12 insertions, 5 deletions
diff --git a/src/service/DAVService.js b/src/service/DAVService.js
index a1d827ff0..97d467e4f 100644
--- a/src/service/DAVService.js
+++ b/src/service/DAVService.js
@@ -24,6 +24,8 @@ import ical from 'ical.js'
import {getCurrentUser, getRequestToken} from 'nextcloud-auth'
import {generateRemoteUrl} from 'nextcloud-router'
+import Logger from '../logger'
+
const client = new dav.Client({
baseUrl: generateRemoteUrl('dav/calendars'),
xmlNamespaces: {
@@ -192,7 +194,10 @@ const splitCalendar = data => {
* @returns {Promise}
*/
export const importCalendarEvent = url => data => {
- console.debug('importing event into calendar', url, data)
+ Logger.debug('importing event into calendar', {
+ url,
+ data,
+ })
const promises = []
const file = splitCalendar(data)
diff --git a/src/service/NotificationService.js b/src/service/NotificationService.js
index 053e7c80c..3a6d3f41b 100644
--- a/src/service/NotificationService.js
+++ b/src/service/NotificationService.js
@@ -23,6 +23,8 @@ import _ from 'lodash'
import {translate as t, translatePlural as n} from 'nextcloud-l10n'
import {generateFilePath} from 'nextcloud-router'
+import Logger from '../logger'
+
/**
* @todo use Notification.requestPermission().then once all browsers support promise API
*
@@ -30,23 +32,23 @@ import {generateFilePath} from 'nextcloud-router'
*/
const request = () => {
if (!('Notification' in window)) {
- console.info('browser does not support desktop notifications')
+ Logger.info('browser does not support desktop notifications')
return Promise.reject()
} else if (Notification.permission === 'granted') {
return Promise.resolve()
} else if (Notification.permission === 'denied') {
- console.info('desktop notifications are denied')
+ Logger.info('desktop notifications are denied')
return Promise.reject()
}
- console.info('requesting permissions to show desktop notifications')
+ Logger.info('requesting permissions to show desktop notifications')
return Notification.requestPermission()
}
const showNotification = (title, body, icon) => {
request().then(() => {
if (document.querySelector(':focus') !== null) {
- console.debug('browser is active. notification request is ignored')
+ Logger.debug('browser is active. notification request is ignored')
return
}
})