Skip to content

Commit

Permalink
sub onGraphLogging with notifyOnLogging
Browse files Browse the repository at this point in the history
  • Loading branch information
etpinard committed Jan 6, 2020
1 parent 75a7414 commit 2bff896
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/lib/loggers.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ loggers.log = function() {
apply(console.trace || console.log, messages);
}

if(dfltConfig.onGraphLogging > 1) {
if(dfltConfig.notifyOnLogging > 1) {
var lines = [];
for(i = 0; i < arguments.length; i++) {
lines.push(arguments[i]);
Expand All @@ -53,7 +53,7 @@ loggers.warn = function() {
apply(console.trace || console.log, messages);
}

if(dfltConfig.onGraphLogging > 0) {
if(dfltConfig.notifyOnLogging > 0) {
var lines = [];
for(i = 0; i < arguments.length; i++) {
lines.push(arguments[i]);
Expand All @@ -73,7 +73,7 @@ loggers.error = function() {
apply(console.error, messages);
}

if(dfltConfig.onGraphLogging > 0) {
if(dfltConfig.notifyOnLogging > 0) {
var lines = [];
for(i = 0; i < arguments.length; i++) {
lines.push(arguments[i]);
Expand Down
2 changes: 1 addition & 1 deletion src/plot_api/plot_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ var configAttributes = {
].join(' ')
},

onGraphLogging: {
notifyOnLogging: {
valType: 'integer',
min: 0,
max: 2,
Expand Down
12 changes: 6 additions & 6 deletions test/jasmine/tests/lib_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1704,13 +1704,13 @@ describe('Test lib.js:', function() {
beforeEach(function() {
stashConsole = window.console;
stashLogLevel = config.logging;
stashOnGraphLogLevel = config.onGraphLogging;
stashOnGraphLogLevel = config.notifyOnLogging;
});

afterEach(function() {
window.console = stashConsole;
config.logging = stashLogLevel;
config.onGraphLogging = stashOnGraphLogLevel;
config.notifyOnLogging = stashOnGraphLogLevel;
});

it('emits one console message if apply is available', function() {
Expand Down Expand Up @@ -1811,7 +1811,7 @@ describe('Test lib.js:', function() {
]);
});

describe('should log message in notifier div in accordance onGraphLogging config option', function() {
describe('should log message in notifier div in accordance notifyOnLogging config option', function() {
var query = '.notifier-note';

beforeEach(function(done) {
Expand Down Expand Up @@ -1840,17 +1840,17 @@ describe('Test lib.js:', function() {
}

it('with level 2', function() {
config.onGraphLogging = 2;
config.notifyOnLogging = 2;
_run(['log', 'warn', 'error!']);
});

it('with level 1', function() {
config.onGraphLogging = 1;
config.notifyOnLogging = 1;
_run(['warn', 'error!']);
});

it('with level 0', function() {
config.onGraphLogging = 0;
config.notifyOnLogging = 0;
_run([]);
});
});
Expand Down

0 comments on commit 2bff896

Please sign in to comment.