Permalink
Browse files

Fix the debug logging regression

Reviewed By: AaaChiuuu

Differential Revision: D5975880

fbshipit-source-id: 39c632ddf84e57c814b54fac465651120e4127da
  • Loading branch information...
alexeylang authored and facebook-github-bot committed Oct 4, 2017
1 parent bee33a4 commit adde2ed5e92f22c93e254633f003c68c945eac9a
Showing with 11 additions and 6 deletions.
  1. +11 −6 ReactAndroid/src/main/java/com/facebook/react/bridge/JavaMethodWrapper.java
@@ -135,6 +135,9 @@ public Promise extractArgument(
}
};

private static final boolean DEBUG =
PrinterHolder.getPrinter().shouldDisplayLogMessage(ReactDebugOverlayTags.BRIDGE_CALLS);

private static char paramTypeToChar(Class paramClass) {
char tryCommon = commonTypeToChar(paramClass);
if (tryCommon != '\0') {
@@ -332,12 +335,14 @@ public void invoke(JSInstance jsInstance, ReadableNativeArray parameters) {
SystraceMessage.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "callJavaModuleMethod")
.arg("method", traceName)
.flush();
PrinterHolder.getPrinter()
.logMessage(
ReactDebugOverlayTags.BRIDGE_CALLS,
"JS->Java: %s.%s()",
mModuleWrapper.getName(),
mMethod.getName());
if (DEBUG) {
PrinterHolder.getPrinter()
.logMessage(
ReactDebugOverlayTags.BRIDGE_CALLS,
"JS->Java: %s.%s()",
mModuleWrapper.getName(),
mMethod.getName());
}
try {
if (!mArgumentsProcessed) {
processArguments();

0 comments on commit adde2ed

Please sign in to comment.