-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
browserConsoleLogOptions does not filter console by level #2228
browserConsoleLogOptions does not filter console by level #2228
Comments
It seems that Also, I noticed that the current log levels are: |
@dignifiedquire if you describe the correct behaviour i can take over this bugfix and propose a pr with possible solution |
This should be changed to what was described in the original report. Moving |
can you merge it? exports.LOG_LOG = 'LOG' exports.LOG_PRIORITIES = [ |
Additional fix to the next bug: filter browser logging by level ([35965d9](karma-runner@35965d9)), closes [karma-runner#2228](karma-runner#2228) otherwise console.log ignore doesn't work with browserConsoleLogOptions: { level: 'debug', terminal: true }
This change made the LOG level messages the lowest priority, which I think should not be the case based on the comment by @dignifiedquire above:
See #2602. |
Expected behavior
I expect that if
browserConsoleLogOptions.level === 'error'
, then any instance ofconsole.log
,console.debug
orconsole.warn
will not appear in my terminal.Actual behavior
Instances of
console.debug
are still shown in my console, despite the following in my Karma configuration:Specifically,
console.debug('hello there!');
results inDEBUG: 'hello there!'
being printed when I run tests.Note that switching
browserConsoleLogOptions.terminal
tofalse
correctly silences allconsole
output.Enviroment Details
Karma 1.1.0 with Webpack 2 through Babel 6 on macOS 10.11.5 with npm 3.8.8 and node v5.11.0. Please see package.json for full requirements.
Steps to reproduce the behaviour
npm install
npm test
The text was updated successfully, but these errors were encountered: