Skip to content

Commit 6c70975

Browse files
Replace printf with YGLog calls
Reviewed By: gkassabli Differential Revision: D6297015 fbshipit-source-id: 6a67bdf33ef121785ac14938f5d3ed6e9d6f2656
1 parent c7f3707 commit 6c70975

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ReactCommon/yoga/yoga/Yoga.c

+7-7
Original file line numberDiff line numberDiff line change
@@ -3503,11 +3503,11 @@ bool YGLayoutNodeInternal(const YGNodeRef node,
35033503
layout->measuredDimensions[YGDimensionHeight] = cachedResults->computedHeight;
35043504

35053505
if (gPrintChanges && gPrintSkips) {
3506-
printf("%s%d.{[skipped] ", YGSpacer(gDepth), gDepth);
3506+
YGLog(node, YGLogLevelVerbose, "%s%d.{[skipped] ", YGSpacer(gDepth), gDepth);
35073507
if (node->print) {
35083508
node->print(node);
35093509
}
3510-
printf("wm: %s, hm: %s, aw: %f ah: %f => d: (%f, %f) %s\n",
3510+
YGLog(node, YGLogLevelVerbose, "wm: %s, hm: %s, aw: %f ah: %f => d: (%f, %f) %s\n",
35113511
YGMeasureModeName(widthMeasureMode, performLayout),
35123512
YGMeasureModeName(heightMeasureMode, performLayout),
35133513
availableWidth,
@@ -3518,11 +3518,11 @@ bool YGLayoutNodeInternal(const YGNodeRef node,
35183518
}
35193519
} else {
35203520
if (gPrintChanges) {
3521-
printf("%s%d.{%s", YGSpacer(gDepth), gDepth, needToVisitNode ? "*" : "");
3521+
YGLog(node, YGLogLevelVerbose, "%s%d.{%s", YGSpacer(gDepth), gDepth, needToVisitNode ? "*" : "");
35223522
if (node->print) {
35233523
node->print(node);
35243524
}
3525-
printf("wm: %s, hm: %s, aw: %f ah: %f %s\n",
3525+
YGLog(node, YGLogLevelVerbose, "wm: %s, hm: %s, aw: %f ah: %f %s\n",
35263526
YGMeasureModeName(widthMeasureMode, performLayout),
35273527
YGMeasureModeName(heightMeasureMode, performLayout),
35283528
availableWidth,
@@ -3542,11 +3542,11 @@ bool YGLayoutNodeInternal(const YGNodeRef node,
35423542
config);
35433543

35443544
if (gPrintChanges) {
3545-
printf("%s%d.}%s", YGSpacer(gDepth), gDepth, needToVisitNode ? "*" : "");
3545+
YGLog(node, YGLogLevelVerbose, "%s%d.}%s", YGSpacer(gDepth), gDepth, needToVisitNode ? "*" : "");
35463546
if (node->print) {
35473547
node->print(node);
35483548
}
3549-
printf("wm: %s, hm: %s, d: (%f, %f) %s\n",
3549+
YGLog(node, YGLogLevelVerbose, "wm: %s, hm: %s, d: (%f, %f) %s\n",
35503550
YGMeasureModeName(widthMeasureMode, performLayout),
35513551
YGMeasureModeName(heightMeasureMode, performLayout),
35523552
layout->measuredDimensions[YGDimensionWidth],
@@ -3559,7 +3559,7 @@ bool YGLayoutNodeInternal(const YGNodeRef node,
35593559
if (cachedResults == NULL) {
35603560
if (layout->nextCachedMeasurementsIndex == YG_MAX_CACHED_RESULT_COUNT) {
35613561
if (gPrintChanges) {
3562-
printf("Out of cache entries!\n");
3562+
YGLog(node, YGLogLevelVerbose, "Out of cache entries!\n");
35633563
}
35643564
layout->nextCachedMeasurementsIndex = 0;
35653565
}

0 commit comments

Comments
 (0)