From bf7a221e905a2d50ef0773d7528b25aaedf8ff6a Mon Sep 17 00:00:00 2001 From: Josh Crowther Date: Wed, 14 Mar 2018 14:23:45 -0700 Subject: [PATCH] Set log level to VERBOSE if enableLogging(true) is passed (#561) --- packages/database/src/core/util/util.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/database/src/core/util/util.ts b/packages/database/src/core/util/util.ts index 72b25e04811..efb003161ee 100644 --- a/packages/database/src/core/util/util.ts +++ b/packages/database/src/core/util/util.ts @@ -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'); @@ -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') {