Java Code Examples for com.facebook.common.logging.FLog#setLoggingDelegate()
The following examples show how to use
com.facebook.common.logging.FLog#setLoggingDelegate() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XLogModule.java From react-native-xlog with MIT License | 5 votes |
private static void init(XLogSetting setting, Context context) { // https://github.com/Tencent/mars#android System.loadLibrary("stlport_shared"); System.loadLibrary("marsxlog"); sXLogSetting = setting; Log.setLogImp(new Xlog()); FLog.setLoggingDelegate(new FLogging2XLogDelegate()); // 重定向RN原生log(FLog)到xlog FLog.setMinimumLoggingLevel(setting.getLevel());// FLog的日志级别和xlog一致 if (context != null) { XLogCustomCrashHandler.getInstance().register(context); // 捕获全局的crash信息 } }
Example 2
Source File: FallbackJSBundleLoaderTest.java From react-native-GPay with MIT License | 4 votes |
@Before public void setup() { mLoggingDelegate = new FakeLoggingDelegate(); FLog.setLoggingDelegate(mLoggingDelegate); }