Skip to content

Commit

Permalink
Set log level to VERBOSE if enableLogging(true) is passed (#561)
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Crowther authored Mar 14, 2018
1 parent 0c5cbe0 commit bf7a221
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/database/src/core/util/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { stringToByteArray } from '@firebase/util';
import { stringify } from '@firebase/util';
import { SessionStorage } from '../storage/storage';
import { isNodeSdk } from '@firebase/util';
import { Logger } from '@firebase/logger';
import { Logger, LogLevel } from '@firebase/logger';

const logClient = new Logger('@firebase/database');

Expand Down Expand Up @@ -108,6 +108,7 @@ export const enableLogging = function(
"Can't turn on custom loggers persistently."
);
if (logger_ === true) {
logClient.logLevel = LogLevel.VERBOSE;
logger = logClient.log.bind(logClient);
if (persistent) SessionStorage.set('logging_enabled', true);
} else if (typeof logger_ === 'function') {
Expand Down

0 comments on commit bf7a221

Please sign in to comment.