Fix the debug logging regression

Reviewed By: AaaChiuuu

Differential Revision: D5975880

fbshipit-source-id: 39c632ddf84e57c814b54fac465651120e4127da
This commit is contained in:
Alexey Lang 2017-10-04 14:58:23 -07:00 committed by Facebook Github Bot
parent bee33a4400
commit adde2ed5e9
1 changed files with 11 additions and 6 deletions

View File

@ -135,6 +135,9 @@ public class JavaMethodWrapper implements NativeModule.NativeMethod {
}
};
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 class JavaMethodWrapper implements NativeModule.NativeMethod {
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();