diff options
author | Ferdinand Thiessen <rpm@fthiessen.de> | 2022-09-06 16:07:05 +0300 |
---|---|---|
committer | Max <max@nextcloud.com> | 2022-09-13 14:04:15 +0300 |
commit | 81d7af739e8c365793888aaa40105ac03f79843e (patch) | |
tree | e1a8bdf7846d76ba8de25dd67460332e91663504 /src/nodes | |
parent | e04ba4911fbaac13d5dc0dd9c4a595ecc9963837 (diff) |
Use `@nextcloud/logger` for all logging
The nextcloud logger take account for the configured logging level,
so only messages the user / administrator wants are logged.
This fixes #2846 (no debug messages are logged if not configured).
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
Diffstat (limited to 'src/nodes')
-rw-r--r-- | src/nodes/ImageView.vue | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/nodes/ImageView.vue b/src/nodes/ImageView.vue index dfd687444..aaea041d8 100644 --- a/src/nodes/ImageView.vue +++ b/src/nodes/ImageView.vue @@ -116,16 +116,17 @@ </template> <script> -import { generateUrl } from '@nextcloud/router' import axios from '@nextcloud/axios' -import { NodeViewWrapper } from '@tiptap/vue-2' import ClickOutside from 'vue-click-outside' -import { Image as ImageIcon, Delete as DeleteIcon } from '../components/icons.js' import NcButton from '@nextcloud/vue/dist/Components/NcButton.js' -import store from './../mixins/store.js' -import { useAttachmentResolver } from './../components/Editor.provider.js' +import { generateUrl } from '@nextcloud/router' +import { NodeViewWrapper } from '@tiptap/vue-2' +import store from './../mixins/store.js' +import { logger } from '../helpers/logger.js' import { mimetypesImages as IMAGE_MIMES } from '../helpers/mime.js' +import { useAttachmentResolver } from '../components/Editor.provider.js' +import { Image as ImageIcon, Delete as DeleteIcon } from '../components/icons.js' const getQueryVariable = (src, variable) => { const query = src.split('?')[1] @@ -295,7 +296,7 @@ export default { return axios.get(metadataUrl).then((response) => { this.attachmentMetadata = response.data }).catch((error) => { - console.error(error) + logger.error('Failed to load media metadata', { error }) }) }, onImageLoadFailure(err) { |