feat(front): use logger instead of console.log
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2535>
This commit is contained in:
parent
c01031945f
commit
b59e29883f
31 changed files with 233 additions and 70 deletions
|
|
@ -3,9 +3,12 @@ import type { InitModule } from '~/types'
|
|||
import { watchEffect, watch } from 'vue'
|
||||
import { useWebSocket, whenever } from '@vueuse/core'
|
||||
import useWebSocketHandler from '~/composables/useWebSocketHandler'
|
||||
import useLogger from '~/composables/useLogger'
|
||||
import { CLIENT_RADIOS } from '~/utils/clientRadios'
|
||||
|
||||
export const install: InitModule = ({ store }) => {
|
||||
const logger = useLogger()
|
||||
|
||||
watch(() => store.state.instance.instanceUrl, () => {
|
||||
const url = store.getters['instance/absoluteUrl']('api/v1/activity')
|
||||
.replace(/^http/, 'ws')
|
||||
|
|
@ -25,7 +28,7 @@ export const install: InitModule = ({ store }) => {
|
|||
})
|
||||
|
||||
watchEffect(() => {
|
||||
console.log('Websocket status:', status.value)
|
||||
logger.log('Websocket status:', status.value)
|
||||
})
|
||||
}, { immediate: true })
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue