Skip to content

Commit

Permalink
fix(logging): Set default logging level as early as possible.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hristoterezov authored and saghul committed Sep 20, 2024
1 parent ef92c2a commit 604acf0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions JitsiMeetJS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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()}`);

Expand Down

0 comments on commit 604acf0

Please sign in to comment.