From 604acf038ee0efdf17c3d55568a808483674a3fa Mon Sep 17 00:00:00 2001 From: Hristo Terezov Date: Thu, 19 Sep 2024 15:53:47 -0500 Subject: [PATCH] fix(logging): Set default logging level as early as possible. We were setting the logging level in JitsiMeetJS.init which potentially would have overriden all external calls for setting the log level before the JitsiMeetJS.init is called. In fact this was happening for jitsi-meet. --- JitsiMeetJS.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/JitsiMeetJS.ts b/JitsiMeetJS.ts index f0de396c28..fea313ce79 100644 --- a/JitsiMeetJS.ts +++ b/JitsiMeetJS.ts @@ -38,6 +38,9 @@ import { VideoType } from './service/RTC/VideoType'; const logger = Logger.getLogger(__filename); +// Settin the default log levels to info early so that we avoid overriding a log level set externally. +Logger.setLogLevel(Logger.levels.INFO); + /** * Indicates whether GUM has been executed or not. */ @@ -136,8 +139,6 @@ export default { mediaDevices: JitsiMediaDevices as unknown, analytics: Statistics.analytics as unknown, init(options: IJitsiMeetJSOptions = {}) { - Logger.setLogLevel(Logger.levels.INFO); - // @ts-ignore logger.info(`This appears to be ${browser.getName()}, ver: ${browser.getVersion()}`);