From 361a4cca76a42b7557adb77fec0d8ae27a57e7f8 Mon Sep 17 00:00:00 2001 From: John Knox Date: Mon, 25 Jun 2018 13:51:01 -0700 Subject: [PATCH] Fix Logger issue in OSS build (#102) Summary: We've replaced the global console.* methods with those in the Logger. The OSS Logger uses a different implementation to the internal fb one, and it still calls back to console.*, causing a stack overflow. Fix it by removing the console calls from Logger.js. Logging to the original console methods is done by the Proxy in App.js. Fixes #101 Closes https://github.com/facebook/Sonar/pull/102 Reviewed By: priteshrnandgaonkar Differential Revision: D8617042 Pulled By: jknoxville fbshipit-source-id: 055bf0e1a2fba8ad5312c88fa97a44389eb52390 --- src/fb-stubs/Logger.js | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/fb-stubs/Logger.js b/src/fb-stubs/Logger.js index a426239dc..f602f2a72 100644 --- a/src/fb-stubs/Logger.js +++ b/src/fb-stubs/Logger.js @@ -20,21 +20,11 @@ export default class LogManager { trackTimeSince(mark: string, eventName: ?string) {} - info(data: any, category: string) { - // eslint-disable-next-line - console.info(data, category); - } + info(data: any, category: string) {} - warn(data: any, category: string) { - console.warn(data, category); - } + warn(data: any, category: string) {} - error(data: any, category: string) { - console.error(data, category); - } + error(data: any, category: string) {} - debug(data: any, category: string) { - // eslint-disable-next-line - console.debug(data, category); - } + debug(data: any, category: string) {} }