Closed Bug 1053796 Opened 10 years ago Closed 10 years ago

TokBox SDK logging is enabled by default

Categories

(Hello (Loop) :: Client, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: standard8, Unassigned)

References

Details

(Whiteboard: [fixed by bug 1066219])

I'm currently debugging non-SDK related issues on the Loop conversation windows.

This is made harder by the amount of debug logging from the SDK.

Looking at the SDK, it should in theory be turned off by default:

http://hg.mozilla.org/mozilla-central/annotate/5299864050ee/browser/components/loop/content/shared/libs/sdk.js#l19

The problem is that here:

http://hg.mozilla.org/mozilla-central/annotate/5299864050ee/browser/components/loop/content/shared/libs/sdk.js#l2950

The check is done as a boolean, and so 'false' doesn't evaluate to false.

I think there are two things to do here:

1) Please can TokBox fix the SDK detection? (setting needinfo)
2) In the desktop browser, we can implement a pref to turn it back on when we need it.
Flags: needinfo?(mozilla-support)
OS: Mac OS X → All
Hardware: x86 → All
You can turn off logging by settingLogLevel: 
OT.setLogLevel(OT.NONE);

Documentation: https://tokbox.com/opentok/libraries/client/js/reference/OT.html#setLogLevel

Will this work for you?
(In reply to song from comment #1)
> You can turn off logging by settingLogLevel: 
> OT.setLogLevel(OT.NONE);
...
> Will this work for you?

Yes it does work, although it still prints out the Tokbox headers for now.
(In reply to Mark Banner (:standard8) from comment #2)
> (In reply to song from comment #1)
> > You can turn off logging by settingLogLevel: 
> > OT.setLogLevel(OT.NONE);
> ...
> > Will this work for you?
> 
> Yes it does work, although it still prints out the Tokbox headers for now.

To clarify: it does work, although the "headers" still get dumped:

"TB.setLogLevel(5)"
"OpenTok JavaScript library v2.2.7.2"
"Release notes: http://www.tokbox.com/opentok/webrtc/docs/js/release-notes.html"
"Known issues: http://www.tokbox.com/opentok/webrtc/docs/js/release-notes.html#knownIssues"
"OT.setLogLevel(5)"

What I'd like to know is, will this be fixed in a future version of the SDK? The SDK obviously isn't doing what it is intended at the moment (no debug).

If it is going to be fixed, I can hold-off on changing our code.
Flags: needinfo?(song)
The problem is that the logs are getting printed out before the loglevel is set. However, we have fixed this and the fix will be available in the next release of the SDK.
Flags: needinfo?(song)
Ok, thanks, I'll wait until the next release.
Flags: needinfo?(mozilla-support)
Whiteboard: [waiting for next sdk release after 2.2.7]
The update to 2.2.9 has fixed this. Thanks.
Status: NEW → RESOLVED
Closed: 10 years ago
Depends on: 1066219
Resolution: --- → FIXED
Whiteboard: [waiting for next sdk release after 2.2.7] → [fixed by bug 1066219]
Untracking for QE verification. Please needinfo me to request testing.
Flags: qe-verify-
QA Contact: anthony.s.hughes
You need to log in before you can comment on or make changes to this bug.