Skip to content

Commit de72424

Browse files
committed
Configuration for the console plugin to choose levels. Fixes #391.
1 parent 3abd8ba commit de72424

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

plugins/console.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
*/
77
'use strict';
88

9-
function consolePlugin(Raven, console) {
9+
function consolePlugin(Raven, console, levels) {
1010
console = console || window.console || {};
1111

1212
var originalConsole = console,
13-
logLevels = ['debug', 'info', 'warn', 'error'],
13+
logLevels = levels || ['debug', 'info', 'warn', 'error'],
1414
level = logLevels.pop();
1515

1616
var logForGivenLevel = function(l) {
@@ -36,7 +36,6 @@ function consolePlugin(Raven, console) {
3636
};
3737
};
3838

39-
4039
while(level) {
4140
console[level] = logForGivenLevel(level);
4241
level = logLevels.pop();

0 commit comments

Comments
 (0)