Sync Logger API

Summary: - Sync Logger API with C implementation

Reviewed By: emilsjolander

Differential Revision: D4143019

fbshipit-source-id: f20203320bad5b8f4b9cce01a5b2e7c615a4d923
This commit is contained in:
Kazuki Sakamoto
2016-11-09 10:14:22 -08:00
committed by Facebook Github Bot
parent f1fcd5e382
commit 863378d74e
5 changed files with 29 additions and 11 deletions

View File

@@ -528,9 +528,10 @@ namespace Facebook.CSSLayout
CSSPrintOptions.Layout|CSSPrintOptions.Style|CSSPrintOptions.Children)
{
StringBuilder sb = new StringBuilder();
CSSLogger.Logger = (message) => {sb.Append(message);};
CSSLogger.Func orig = CSSLogger.Logger;
CSSLogger.Logger = (level, message) => {sb.Append(message);};
Native.CSSNodePrint(_cssNode, options);
CSSLogger.Logger = null;
CSSLogger.Logger = orig;
return sb.ToString();
}