-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: extend stats object #10
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import videojs from 'video.js'; | ||
|
||
const logger = (source) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will not allow us the ability to turn debug logging on mid session via
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you don't even need the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh right, good call! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oops this is checking if debug api is available, not if the mode is debug |
||
if (videojs.log.debug) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know we discussed how the history object might get crowded by the debug logging once it's available. Do we know about how many logs per minute of video we'll be generating? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like around ~35 items per minute with what's being logged at the moment There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If that's pretty standard (and we can't get into a case where the log messages explode), that seems pretty good (to not have to hide behind another config flag). We should be careful to look at some of the cases in case any could spew messages though, and test some scenarios to make sure we don't kill a browser tab from memory consumptions. |
||
return videojs.log.debug.bind(videojs, 'VHS:', `${source} >`); | ||
} | ||
|
||
return function() {}; | ||
}; | ||
|
||
export default logger; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any specific reason for removing this and other logs that currently exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mjneil was removing some excessive logging