Permalink
Browse files

Replace printf with YGLog calls

Reviewed By: gkassabli

Differential Revision: D6297015

fbshipit-source-id: 6a67bdf33ef121785ac14938f5d3ed6e9d6f2656
  • Loading branch information...
priteshrnandgaonkar authored and facebook-github-bot committed Nov 16, 2017
1 parent c7f3707 commit 6c70975689d0f0839e6c2db9a9a25c3023f5be7b
Showing with 7 additions and 7 deletions.
  1. +7 −7 ReactCommon/yoga/yoga/Yoga.c
@@ -3503,11 +3503,11 @@ bool YGLayoutNodeInternal(const YGNodeRef node,
layout->measuredDimensions[YGDimensionHeight] = cachedResults->computedHeight;
if (gPrintChanges && gPrintSkips) {
printf("%s%d.{[skipped] ", YGSpacer(gDepth), gDepth);
YGLog(node, YGLogLevelVerbose, "%s%d.{[skipped] ", YGSpacer(gDepth), gDepth);
if (node->print) {
node->print(node);
}
printf("wm: %s, hm: %s, aw: %f ah: %f => d: (%f, %f) %s\n",
YGLog(node, YGLogLevelVerbose, "wm: %s, hm: %s, aw: %f ah: %f => d: (%f, %f) %s\n",
YGMeasureModeName(widthMeasureMode, performLayout),
YGMeasureModeName(heightMeasureMode, performLayout),
availableWidth,
@@ -3518,11 +3518,11 @@ bool YGLayoutNodeInternal(const YGNodeRef node,
}
} else {
if (gPrintChanges) {
printf("%s%d.{%s", YGSpacer(gDepth), gDepth, needToVisitNode ? "*" : "");
YGLog(node, YGLogLevelVerbose, "%s%d.{%s", YGSpacer(gDepth), gDepth, needToVisitNode ? "*" : "");
if (node->print) {
node->print(node);
}
printf("wm: %s, hm: %s, aw: %f ah: %f %s\n",
YGLog(node, YGLogLevelVerbose, "wm: %s, hm: %s, aw: %f ah: %f %s\n",
YGMeasureModeName(widthMeasureMode, performLayout),
YGMeasureModeName(heightMeasureMode, performLayout),
availableWidth,
@@ -3542,11 +3542,11 @@ bool YGLayoutNodeInternal(const YGNodeRef node,
config);
if (gPrintChanges) {
printf("%s%d.}%s", YGSpacer(gDepth), gDepth, needToVisitNode ? "*" : "");
YGLog(node, YGLogLevelVerbose, "%s%d.}%s", YGSpacer(gDepth), gDepth, needToVisitNode ? "*" : "");
if (node->print) {
node->print(node);
}
printf("wm: %s, hm: %s, d: (%f, %f) %s\n",
YGLog(node, YGLogLevelVerbose, "wm: %s, hm: %s, d: (%f, %f) %s\n",
YGMeasureModeName(widthMeasureMode, performLayout),
YGMeasureModeName(heightMeasureMode, performLayout),
layout->measuredDimensions[YGDimensionWidth],
@@ -3559,7 +3559,7 @@ bool YGLayoutNodeInternal(const YGNodeRef node,
if (cachedResults == NULL) {
if (layout->nextCachedMeasurementsIndex == YG_MAX_CACHED_RESULT_COUNT) {
if (gPrintChanges) {
printf("Out of cache entries!\n");
YGLog(node, YGLogLevelVerbose, "Out of cache entries!\n");
}
layout->nextCachedMeasurementsIndex = 0;
}

0 comments on commit 6c70975

Please sign in to comment.