Skip to content

Commit

Permalink
Replace printf with YGLog calls
Browse files Browse the repository at this point in the history
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 6c70975
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ReactCommon/yoga/yoga/Yoga.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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],
Expand All @@ -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;
}
Expand Down

0 comments on commit 6c70975

Please sign in to comment.