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:
David Aurelio 2019-02-19 09:54:45 -08:00 коммит произвёл Facebook Github Bot
Родитель b23676836f
Коммит e8f95dc7a1
6 изменённых файлов: 129 добавлений и 58 удалений

Просмотреть файл

@ -1077,6 +1077,12 @@
AC90463F21C91D02005B24B3 /* CompactValue.h in Headers */ = {isa = PBXBuildFile; fileRef = AC90463D21C91CC2005B24B3 /* CompactValue.h */; }; AC90463F21C91D02005B24B3 /* CompactValue.h in Headers */ = {isa = PBXBuildFile; fileRef = AC90463D21C91CC2005B24B3 /* CompactValue.h */; };
AC90464021C91D14005B24B3 /* CompactValue.h in Headers */ = {isa = PBXBuildFile; fileRef = AC90463D21C91CC2005B24B3 /* CompactValue.h */; }; AC90464021C91D14005B24B3 /* CompactValue.h in Headers */ = {isa = PBXBuildFile; fileRef = AC90463D21C91CC2005B24B3 /* CompactValue.h */; };
AC90464121C91DB8005B24B3 /* YGConfig.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 5CE2080120772F7C009A43B3 /* YGConfig.h */; }; AC90464121C91DB8005B24B3 /* YGConfig.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 5CE2080120772F7C009A43B3 /* YGConfig.h */; };
ACC75C54221AA188002F24E8 /* log.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ACC75C53221AA188002F24E8 /* log.cpp */; };
ACC75C56221AA194002F24E8 /* log.h in Headers */ = {isa = PBXBuildFile; fileRef = ACC75C55221AA194002F24E8 /* log.h */; };
ACC75C57221AA1BD002F24E8 /* log.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ACC75C53221AA188002F24E8 /* log.cpp */; };
ACC75C58221AA1CF002F24E8 /* log.h in Headers */ = {isa = PBXBuildFile; fileRef = ACC75C55221AA194002F24E8 /* log.h */; };
ACC75C59221AA1E1002F24E8 /* log.h in Headers */ = {isa = PBXBuildFile; fileRef = ACC75C55221AA194002F24E8 /* log.h */; };
ACC75C5A221AA1EA002F24E8 /* log.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ACC75C53221AA188002F24E8 /* log.cpp */; };
B233E6EA1D2D845D00BC68BA /* RCTI18nManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B233E6E91D2D845D00BC68BA /* RCTI18nManager.m */; }; B233E6EA1D2D845D00BC68BA /* RCTI18nManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B233E6E91D2D845D00BC68BA /* RCTI18nManager.m */; };
B95154321D1B34B200FE7B80 /* RCTActivityIndicatorView.m in Sources */ = {isa = PBXBuildFile; fileRef = B95154311D1B34B200FE7B80 /* RCTActivityIndicatorView.m */; }; B95154321D1B34B200FE7B80 /* RCTActivityIndicatorView.m in Sources */ = {isa = PBXBuildFile; fileRef = B95154311D1B34B200FE7B80 /* RCTActivityIndicatorView.m */; };
BA0501AD2109DCF200A6BBC4 /* ReactMarker.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 13DA8A2F2097A90A00276ED4 /* ReactMarker.h */; }; BA0501AD2109DCF200A6BBC4 /* ReactMarker.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 13DA8A2F2097A90A00276ED4 /* ReactMarker.h */; };
@ -2210,6 +2216,8 @@
AC70D2EB1DE48A22002E6351 /* JSBundleType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSBundleType.cpp; sourceTree = "<group>"; }; AC70D2EB1DE48A22002E6351 /* JSBundleType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSBundleType.cpp; sourceTree = "<group>"; };
AC8360CC21B0256A00FC46B9 /* YGMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YGMarker.h; sourceTree = "<group>"; }; AC8360CC21B0256A00FC46B9 /* YGMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YGMarker.h; sourceTree = "<group>"; };
AC90463D21C91CC2005B24B3 /* CompactValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CompactValue.h; sourceTree = "<group>"; }; AC90463D21C91CC2005B24B3 /* CompactValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CompactValue.h; sourceTree = "<group>"; };
ACC75C53221AA188002F24E8 /* log.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = log.cpp; sourceTree = "<group>"; };
ACC75C55221AA194002F24E8 /* log.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = log.h; sourceTree = "<group>"; };
ACDD3FDA1BC7430D00E7DE33 /* RCTBorderStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTBorderStyle.h; sourceTree = "<group>"; }; ACDD3FDA1BC7430D00E7DE33 /* RCTBorderStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTBorderStyle.h; sourceTree = "<group>"; };
B233E6E81D2D843200BC68BA /* RCTI18nManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = RCTI18nManager.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; B233E6E81D2D843200BC68BA /* RCTI18nManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = RCTI18nManager.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
B233E6E91D2D845D00BC68BA /* RCTI18nManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTI18nManager.m; sourceTree = "<group>"; }; B233E6E91D2D845D00BC68BA /* RCTI18nManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTI18nManager.m; sourceTree = "<group>"; };
@ -2332,6 +2340,8 @@
130A77021DF767AF001F9587 /* yoga */ = { 130A77021DF767AF001F9587 /* yoga */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
ACC75C55221AA194002F24E8 /* log.h */,
ACC75C53221AA188002F24E8 /* log.cpp */,
AC4A6AF821FB4EA900FBEC39 /* YGMarker.cpp */, AC4A6AF821FB4EA900FBEC39 /* YGMarker.cpp */,
AC52CEDD21FB3FF9003C6BEC /* instrumentation.h */, AC52CEDD21FB3FF9003C6BEC /* instrumentation.h */,
AC90463D21C91CC2005B24B3 /* CompactValue.h */, AC90463D21C91CC2005B24B3 /* CompactValue.h */,
@ -3255,6 +3265,7 @@
isa = PBXHeadersBuildPhase; isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
ACC75C58221AA1CF002F24E8 /* log.h in Headers */,
AC52CEE021FB403B003C6BEC /* instrumentation.h in Headers */, AC52CEE021FB403B003C6BEC /* instrumentation.h in Headers */,
AC90463F21C91D02005B24B3 /* CompactValue.h in Headers */, AC90463F21C91D02005B24B3 /* CompactValue.h in Headers */,
AC6B69E821B146C500B2B68A /* YGValue.h in Headers */, AC6B69E821B146C500B2B68A /* YGValue.h in Headers */,
@ -3321,6 +3332,7 @@
isa = PBXHeadersBuildPhase; isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
ACC75C59221AA1E1002F24E8 /* log.h in Headers */,
AC52CEDF21FB401D003C6BEC /* instrumentation.h in Headers */, AC52CEDF21FB401D003C6BEC /* instrumentation.h in Headers */,
AC90464021C91D14005B24B3 /* CompactValue.h in Headers */, AC90464021C91D14005B24B3 /* CompactValue.h in Headers */,
AC6B69E521B1469A00B2B68A /* YGValue.h in Headers */, AC6B69E521B1469A00B2B68A /* YGValue.h in Headers */,
@ -3511,6 +3523,7 @@
3D80DA7C1DF820620028D040 /* RCTRefreshControlManager.h in Headers */, 3D80DA7C1DF820620028D040 /* RCTRefreshControlManager.h in Headers */,
59D031ED1F8353D3008361F0 /* RCTSafeAreaShadowView.h in Headers */, 59D031ED1F8353D3008361F0 /* RCTSafeAreaShadowView.h in Headers */,
3D80DA7D1DF820620028D040 /* RCTRootShadowView.h in Headers */, 3D80DA7D1DF820620028D040 /* RCTRootShadowView.h in Headers */,
ACC75C56221AA194002F24E8 /* log.h in Headers */,
134D63C31F1FEC4B008872B5 /* RCTCxxBridgeDelegate.h in Headers */, 134D63C31F1FEC4B008872B5 /* RCTCxxBridgeDelegate.h in Headers */,
657734901EE8354A00A0E9EA /* RCTInspectorPackagerConnection.h in Headers */, 657734901EE8354A00A0E9EA /* RCTInspectorPackagerConnection.h in Headers */,
3D7BFD1D1EA8E351008DFB7A /* RCTPackagerConnection.h in Headers */, 3D7BFD1D1EA8E351008DFB7A /* RCTPackagerConnection.h in Headers */,
@ -4349,6 +4362,7 @@
isa = PBXSourcesBuildPhase; isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
ACC75C5A221AA1EA002F24E8 /* log.cpp in Sources */,
AC4A6AFA21FB4EBF00FBEC39 /* YGMarker.cpp in Sources */, AC4A6AFA21FB4EBF00FBEC39 /* YGMarker.cpp in Sources */,
AC6B69E721B146B400B2B68A /* YGValue.cpp in Sources */, AC6B69E721B146B400B2B68A /* YGValue.cpp in Sources */,
AC8360D121B025BC00FC46B9 /* YGConfig.cpp in Sources */, AC8360D121B025BC00FC46B9 /* YGConfig.cpp in Sources */,
@ -4366,6 +4380,7 @@
isa = PBXSourcesBuildPhase; isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
ACC75C57221AA1BD002F24E8 /* log.cpp in Sources */,
AC4A6AFB21FB4ECA00FBEC39 /* YGMarker.cpp in Sources */, AC4A6AFB21FB4ECA00FBEC39 /* YGMarker.cpp in Sources */,
AC6B69EA21B146E700B2B68A /* YGValue.cpp in Sources */, AC6B69EA21B146E700B2B68A /* YGValue.cpp in Sources */,
BA0501B02109DD1800A6BBC4 /* YGConfig.cpp in Sources */, BA0501B02109DD1800A6BBC4 /* YGConfig.cpp in Sources */,
@ -4492,6 +4507,7 @@
59EDBCBB1FDF4E0C003573DE /* RCTScrollViewManager.m in Sources */, 59EDBCBB1FDF4E0C003573DE /* RCTScrollViewManager.m in Sources */,
599FAA441FB274980058CCF6 /* RCTSurfaceRootView.mm in Sources */, 599FAA441FB274980058CCF6 /* RCTSurfaceRootView.mm in Sources */,
C60669361F3CCF1B00E67165 /* RCTManagedPointer.mm in Sources */, C60669361F3CCF1B00E67165 /* RCTManagedPointer.mm in Sources */,
ACC75C54221AA188002F24E8 /* log.cpp in Sources */,
13B080261A694A8400A75B9A /* RCTWrapperViewController.m in Sources */, 13B080261A694A8400A75B9A /* RCTWrapperViewController.m in Sources */,
A2440AA31DF8D854006E7BFC /* RCTReloadCommand.m in Sources */, A2440AA31DF8D854006E7BFC /* RCTReloadCommand.m in Sources */,
6577348F1EE8354A00A0E9EA /* RCTInspector.mm in Sources */, 6577348F1EE8354A00A0E9EA /* RCTInspector.mm in Sources */,

Просмотреть файл

@ -7,10 +7,12 @@
#include <fb/fbjni.h> #include <fb/fbjni.h>
#include <yoga/YGNode.h> #include <yoga/YGNode.h>
#include <yoga/Yoga.h> #include <yoga/Yoga.h>
#include <yoga/log.h>
#include <iostream> #include <iostream>
using namespace facebook::jni; using namespace facebook::jni;
using namespace std; using namespace std;
using facebook::yoga::detail::Log;
struct JYogaNode : public JavaClass<JYogaNode> { struct JYogaNode : public JavaClass<JYogaNode> {
static constexpr auto kJavaDescriptor = "Lcom/facebook/yoga/YogaNode;"; static constexpr auto kJavaDescriptor = "Lcom/facebook/yoga/YogaNode;";
@ -51,7 +53,7 @@ static void YGTransferLayoutOutputsRecursive(YGNodeRef root) {
} }
auto obj = YGNodeJobject(root)->lockLocal(); auto obj = YGNodeJobject(root)->lockLocal();
if (!obj) { if (!obj) {
YGLog( Log::log(
root, root,
YGLogLevelError, YGLogLevelError,
"Java YGNode was GCed during layout calculation\n"); "Java YGNode was GCed during layout calculation\n");
@ -154,7 +156,7 @@ static void YGPrint(YGNodeRef node) {
if (auto obj = YGNodeJobject(node)->lockLocal()) { if (auto obj = YGNodeJobject(node)->lockLocal()) {
cout << obj->toString() << endl; cout << obj->toString() << endl;
} else { } else {
YGLog( Log::log(
node, node,
YGLogLevelError, YGLogLevelError,
"Java YGNode was GCed during layout calculation\n"); "Java YGNode was GCed during layout calculation\n");
@ -240,7 +242,7 @@ static YGSize YGJNIMeasureFunc(
return YGSize{*measuredWidth, *measuredHeight}; return YGSize{*measuredWidth, *measuredHeight};
} else { } else {
YGLog( Log::log(
node, node,
YGLogLevelError, YGLogLevelError,
"Java YGNode was GCed during layout calculation\n"); "Java YGNode was GCed during layout calculation\n");

Просмотреть файл

@ -5,6 +5,7 @@
* file in the root directory of this source tree. * file in the root directory of this source tree.
*/ */
#include "Yoga.h" #include "Yoga.h"
#include "log.h"
#include <float.h> #include <float.h>
#include <string.h> #include <string.h>
#include <algorithm> #include <algorithm>
@ -25,6 +26,7 @@ __forceinline const float fmaxf(const float a, const float b) {
#endif #endif
using namespace facebook::yoga; using namespace facebook::yoga;
using detail::Log;
#ifdef ANDROID #ifdef ANDROID
static int YGAndroidLog( static int YGAndroidLog(
@ -1028,7 +1030,7 @@ static void YGNodePrintInternal(
const YGPrintOptions options) { const YGPrintOptions options) {
std::string str; std::string str;
facebook::yoga::YGNodeToString(str, node, options, 0); facebook::yoga::YGNodeToString(str, node, options, 0);
YGLog(node, YGLogLevelDebug, str.c_str()); Log::log(node, YGLogLevelDebug, str.c_str());
} }
void YGNodePrint(const YGNodeRef node, const YGPrintOptions options) { void YGNodePrint(const YGNodeRef node, const YGPrintOptions options) {
@ -3814,7 +3816,7 @@ bool YGLayoutNodeInternal(
: layoutMarkerData.cachedMeasures) += 1; : layoutMarkerData.cachedMeasures) += 1;
if (gPrintChanges && gPrintSkips) { if (gPrintChanges && gPrintSkips) {
YGLog( Log::log(
node, node,
YGLogLevelVerbose, YGLogLevelVerbose,
"%s%d.{[skipped] ", "%s%d.{[skipped] ",
@ -3823,7 +3825,7 @@ bool YGLayoutNodeInternal(
if (node->getPrintFunc() != nullptr) { if (node->getPrintFunc() != nullptr) {
node->getPrintFunc()(node); node->getPrintFunc()(node);
} }
YGLog( Log::log(
node, node,
YGLogLevelVerbose, YGLogLevelVerbose,
"wm: %s, hm: %s, aw: %f ah: %f => d: (%f, %f) %s\n", "wm: %s, hm: %s, aw: %f ah: %f => d: (%f, %f) %s\n",
@ -3837,7 +3839,7 @@ bool YGLayoutNodeInternal(
} }
} else { } else {
if (gPrintChanges) { if (gPrintChanges) {
YGLog( Log::log(
node, node,
YGLogLevelVerbose, YGLogLevelVerbose,
"%s%d.{%s", "%s%d.{%s",
@ -3847,7 +3849,7 @@ bool YGLayoutNodeInternal(
if (node->getPrintFunc() != nullptr) { if (node->getPrintFunc() != nullptr) {
node->getPrintFunc()(node); node->getPrintFunc()(node);
} }
YGLog( Log::log(
node, node,
YGLogLevelVerbose, YGLogLevelVerbose,
"wm: %s, hm: %s, aw: %f ah: %f %s\n", "wm: %s, hm: %s, aw: %f ah: %f %s\n",
@ -3872,7 +3874,7 @@ bool YGLayoutNodeInternal(
layoutMarkerData); layoutMarkerData);
if (gPrintChanges) { if (gPrintChanges) {
YGLog( Log::log(
node, node,
YGLogLevelVerbose, YGLogLevelVerbose,
"%s%d.}%s", "%s%d.}%s",
@ -3882,7 +3884,7 @@ bool YGLayoutNodeInternal(
if (node->getPrintFunc() != nullptr) { if (node->getPrintFunc() != nullptr) {
node->getPrintFunc()(node); node->getPrintFunc()(node);
} }
YGLog( Log::log(
node, node,
YGLogLevelVerbose, YGLogLevelVerbose,
"wm: %s, hm: %s, d: (%f, %f) %s\n", "wm: %s, hm: %s, d: (%f, %f) %s\n",
@ -3903,7 +3905,7 @@ bool YGLayoutNodeInternal(
} }
if (layout->nextCachedMeasurementsIndex == YG_MAX_CACHED_RESULT_COUNT) { if (layout->nextCachedMeasurementsIndex == YG_MAX_CACHED_RESULT_COUNT) {
if (gPrintChanges) { if (gPrintChanges) {
YGLog(node, YGLogLevelVerbose, "Out of cache entries!\n"); Log::log(node, YGLogLevelVerbose, "Out of cache entries!\n");
} }
layout->nextCachedMeasurementsIndex = 0; layout->nextCachedMeasurementsIndex = 0;
} }
@ -4196,43 +4198,9 @@ void YGConfigSetShouldDiffLayoutWithoutLegacyStretchBehaviour(
config->shouldDiffLayoutWithoutLegacyStretchBehaviour = shouldDiffLayout; config->shouldDiffLayoutWithoutLegacyStretchBehaviour = shouldDiffLayout;
} }
static void YGVLog(
const YGConfigRef config,
const YGNodeRef node,
YGLogLevel level,
const char* format,
va_list args) {
const YGConfigRef logConfig =
config != nullptr ? config : YGConfigGetDefault();
logConfig->logger(logConfig, node, level, format, args);
if (level == YGLogLevelFatal) {
abort();
}
}
void YGLogWithConfig(
const YGConfigRef config,
YGLogLevel level,
const char* format,
...) {
va_list args;
va_start(args, format);
YGVLog(config, nullptr, level, format, args);
va_end(args);
}
void YGLog(const YGNodeRef node, YGLogLevel level, const char* format, ...) {
va_list args;
va_start(args, format);
YGVLog(
node == nullptr ? nullptr : node->getConfig(), node, level, format, args);
va_end(args);
}
void YGAssert(const bool condition, const char* message) { void YGAssert(const bool condition, const char* message) {
if (!condition) { if (!condition) {
YGLog(nullptr, YGLogLevelFatal, "%s\n", message); Log::log(YGNodeRef{nullptr}, YGLogLevelFatal, "%s\n", message);
} }
} }
@ -4241,7 +4209,7 @@ void YGAssertWithNode(
const bool condition, const bool condition,
const char* message) { const char* message) {
if (!condition) { if (!condition) {
YGLog(node, YGLogLevelFatal, "%s\n", message); Log::log(node, YGLogLevelFatal, "%s\n", message);
} }
} }
@ -4250,7 +4218,7 @@ void YGAssertWithConfig(
const bool condition, const bool condition,
const char* message) { const char* message) {
if (!condition) { if (!condition) {
YGLogWithConfig(config, YGLogLevelFatal, "%s\n", message); Log::log(config, YGLogLevelFatal, "%s\n", message);
} }
} }

Просмотреть файл

@ -348,16 +348,6 @@ WIN_EXPORT float YGNodeLayoutGetPadding(
const YGEdge edge); const YGEdge edge);
WIN_EXPORT void YGConfigSetLogger(const YGConfigRef config, YGLogger logger); WIN_EXPORT void YGConfigSetLogger(const YGConfigRef config, YGLogger logger);
WIN_EXPORT void YGLog(
const YGNodeRef node,
YGLogLevel level,
const char* message,
...);
WIN_EXPORT void YGLogWithConfig(
const YGConfigRef config,
YGLogLevel level,
const char* format,
...);
WIN_EXPORT void YGAssert(const bool condition, const char* message); WIN_EXPORT void YGAssert(const bool condition, const char* message);
WIN_EXPORT void YGAssertWithNode( WIN_EXPORT void YGAssertWithNode(
const YGNodeRef node, const YGNodeRef node,

Просмотреть файл

@ -0,0 +1,60 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*/
#include "log.h"
#include "Yoga.h"
#include "YGConfig.h"
#include "YGNode.h"
namespace facebook {
namespace yoga {
namespace detail {
namespace {
void vlog(
YGConfig* config,
YGNode* node,
YGLogLevel level,
const char* format,
va_list args) {
YGConfig* logConfig = config != nullptr ? config : YGConfigGetDefault();
logConfig->logger(logConfig, node, level, format, args);
if (level == YGLogLevelFatal) {
abort();
}
}
} // namespace
void Log::log(
YGNode* node,
YGLogLevel level,
const char* format,
...) noexcept {
va_list args;
va_start(args, format);
vlog(
node == nullptr ? nullptr : node->getConfig(), node, level, format, args);
va_end(args);
}
void Log::log(
YGConfig* config,
YGLogLevel level,
const char* format,
...) noexcept {
va_list args;
va_start(args, format);
vlog(config, nullptr, level, format, args);
va_end(args);
}
} // namespace detail
} // namespace yoga
} // namespace facebook

Просмотреть файл

@ -0,0 +1,35 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*/
#pragma once
#include "YGEnums.h"
struct YGNode;
struct YGConfig;
namespace facebook {
namespace yoga {
namespace detail {
struct Log {
static void log(
YGNode* node,
YGLogLevel level,
const char* message,
...) noexcept;
static void log(
YGConfig* config,
YGLogLevel level,
const char* format,
...) noexcept;
};
} // namespace detail
} // namespace yoga
} // namespace facebook