summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.js5
-rw-r--r--src/services/logger.js28
-rw-r--r--src/views/Contacts.vue6
3 files changed, 38 insertions, 1 deletions
diff --git a/src/main.js b/src/main.js
index 397a35bb..51a2b45c 100644
--- a/src/main.js
+++ b/src/main.js
@@ -28,6 +28,7 @@ import Vue from 'vue'
import App from './ContactsRoot'
import router from './router'
import store from './store'
+import logger from './services/logger'
/** GLOBAL COMPONENTS AND DIRECTIVE */
import ClickOutside from 'vue-click-outside'
@@ -55,8 +56,10 @@ sync(store, router)
Vue.prototype.t = t
Vue.prototype.n = n
-// eslint-disable-next-line
+
+Vue.prototype.appName = appName
Vue.prototype.appVersion = appVersion
+Vue.prototype.logger = logger
Vue.prototype.OC = OC
Vue.prototype.OCA = OCA
diff --git a/src/services/logger.js b/src/services/logger.js
new file mode 100644
index 00000000..c30f921e
--- /dev/null
+++ b/src/services/logger.js
@@ -0,0 +1,28 @@
+/**
+ * @copyright 2021 Christoph Wurst <christoph@winzerhof-wurst.at>
+ *
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+import { getLoggerBuilder } from '@nextcloud/logger'
+
+export default getLoggerBuilder()
+ .setApp(appName)
+ .detectUser()
+ .build()
diff --git a/src/views/Contacts.vue b/src/views/Contacts.vue
index 72f3fd5e..3306ade7 100644
--- a/src/views/Contacts.vue
+++ b/src/views/Contacts.vue
@@ -214,6 +214,12 @@ export default {
mounted() {
// Register search
this.search = new OCA.Search(this.search, this.resetSearch)
+
+ if (this.isCirclesEnabled) {
+ this.logger.info('Circles frontend enabled')
+ } else {
+ this.logger.info('No compatible version of circles found')
+ }
},
async beforeMount() {