Make logging private
Summary: @public Makes logging implementation internal to Yoga. Breaking changes: removed `YGLog` and `YGLogWithConfig`. The upcoming changes to the JNI layer (removal of weak global refs for each node) requires adding additional parameters to the logging functions that will only be available when calculating layout. Reviewed By: SidharthGuglani Differential Revision: D14123390 fbshipit-source-id: 468e4a240c190342868ffbb5f8beb92324cdfdd6
This commit is contained in:
committed by
Facebook Github Bot
parent
446101a168
commit
1b9053bc5d
@@ -7,10 +7,12 @@
|
||||
#include <fb/fbjni.h>
|
||||
#include <yoga/YGNode.h>
|
||||
#include <yoga/Yoga.h>
|
||||
#include <yoga/log.h>
|
||||
#include <iostream>
|
||||
|
||||
using namespace facebook::jni;
|
||||
using namespace std;
|
||||
using facebook::yoga::detail::Log;
|
||||
|
||||
struct JYogaNode : public JavaClass<JYogaNode> {
|
||||
static constexpr auto kJavaDescriptor = "Lcom/facebook/yoga/YogaNode;";
|
||||
@@ -51,7 +53,7 @@ static void YGTransferLayoutOutputsRecursive(YGNodeRef root) {
|
||||
}
|
||||
auto obj = YGNodeJobject(root)->lockLocal();
|
||||
if (!obj) {
|
||||
YGLog(
|
||||
Log::log(
|
||||
root,
|
||||
YGLogLevelError,
|
||||
"Java YGNode was GCed during layout calculation\n");
|
||||
@@ -154,7 +156,7 @@ static void YGPrint(YGNodeRef node) {
|
||||
if (auto obj = YGNodeJobject(node)->lockLocal()) {
|
||||
cout << obj->toString() << endl;
|
||||
} else {
|
||||
YGLog(
|
||||
Log::log(
|
||||
node,
|
||||
YGLogLevelError,
|
||||
"Java YGNode was GCed during layout calculation\n");
|
||||
@@ -240,7 +242,7 @@ static YGSize YGJNIMeasureFunc(
|
||||
|
||||
return YGSize{*measuredWidth, *measuredHeight};
|
||||
} else {
|
||||
YGLog(
|
||||
Log::log(
|
||||
node,
|
||||
YGLogLevelError,
|
||||
"Java YGNode was GCed during layout calculation\n");
|
||||
|
Reference in New Issue
Block a user