Logger: improving the logger, and using it in client code.

This commit is contained in:
John Livingston
2024-06-14 15:17:14 +02:00
parent d931a9c144
commit 2739bb823a
9 changed files with 29 additions and 19 deletions

View File

@ -6,6 +6,7 @@ import type { RegisterClientOptions } from '@peertube/peertube-types/client'
import type { InitConverseJSParams, ChatPeertubeIncludeMode } from 'shared/lib/types'
import { computeAutoColors } from './colors'
import { getBaseRoute } from './uri'
import { logger } from './logger'
// FIXME: better declaration (see builtin.ts)
declare global {
@ -143,7 +144,7 @@ async function displayConverseJS (
if (!a) { return }
if (a.getAttribute('href') !== '#') { return }
console.log('[peertube-plugin-livechat] intercepting a click on href=# in converse root, canceling the event.')
logger.log('Intercepting a click on href=# in converse root, canceling the event.')
ev.preventDefault()
})