Skip to content

Commit

Permalink
fixup logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbrand committed Mar 23, 2024
1 parent 508d71e commit de41bbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/headless/shared/connection/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function generateResource () {

export function setStropheLogging () {
const level = settings_api.get('loglevel');
Strophe.setLogLevel(level)
Strophe.setLogLevel(Strophe.LogLevel[level.toUpperCase()])

Check notice

Code scanning / CodeQL

Semicolon insertion Note

Avoid automated semicolon insertion (90% of all statements in
the enclosing function
have an explicit semicolon).

const lmap = {};
lmap[Strophe.LogLevel.DEBUG] = 'debug';
Expand All @@ -17,7 +17,7 @@ export function setStropheLogging () {
lmap[Strophe.LogLevel.ERROR] = 'error';
lmap[Strophe.LogLevel.FATAL] = 'fatal';

Strophe.log = (level, msg) => log.log(msg, lmap[level]);
Strophe.log = (l, msg) => log.log(msg, lmap[l]);
Strophe.error = (msg) => log.error(msg);
}

Expand Down

0 comments on commit de41bbd

Please sign in to comment.