禁止在React Native应用中启动日志记录

时间:2019-04-17 19:42:03

标签: react-native expo

每次启动EXPO应用程序时,有什么方法可以从日志中取消此操作:

Running application "main" with appParams: {"rootTag":171,"initialProps":{"exp":{"manifest":{"slug":"F8-Elements","debuggerHost":"192.168.1.5:19001","packagerOpts":{"lanType":"ip","urlRandomness":"7i-wxv","hostType":"lan","dev":true,"minify":false},"bundleUrl":"http://xxx.xxx.x:19001/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&minify=false&hot=false&assetPlugin=%2FUsers%MyComputer%2FDevelopment%2FQMG-local%2FF8-Elements%2Fnode_modules%2Fexpo%2Ftools%2FhashAssetFiles.js","icon":"./assets/images/icon.png","isVerified":true,"name":"F8 Elements React Native","xde":true,"version":"1.0.0","iconUrl":"http://xxx.xxx.x:19001/assets/./assets/images/icon.png","hostUri":"xxx.xxx.x.5:19000","id":"@tuzmusic/F8-Elements","updates":{"fallbackToCacheTimeout":0},"orientation":"portrait","sdkVersion":"32.0.0","loadedFromCache":false,"logUrl":"http://xxx.xxx.x.5:19000/logs","env":{},"ios":{"supportsTablet":true},"platforms":["ios","android"],"assetBundlePatterns":["**/*"],"privacy":"public","mainModuleName":"node_modules/expo/AppEntry","developer":{"projectRoot":"/Users/MyComputer/Development/QMG-local/F8-Elements","tool":"expo-cli"},"splash":{"resizeMode":"contain","backgroundColor":"#ffffff","image":"./assets/images/splash.png","imageUrl":"http://192.168.1.5:19001/assets/./assets/images/splash.png"}},"appOwnership":"expo","initialUri":"exp://xxx.xxx.x.5:19000","shell":0}}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF

它显然是expo库的一部分或其他内容,但是也许我可以在package.json中写一些东西将其关闭吗?

1 个答案:

答案 0 :(得分:0)

这是标准消息emitted here by React Native,不是Expo发出的。除了将默认日志级别提高到高于“信息”之外,似乎无法将其关闭。