
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
react-native-xlog
Advanced tools
Wechat's Xlog framework for RN.
You can send log to Xlog, and manager Xlog lifecycle. Handle js/native crash log in production builds.
attention: you will see the crash log only when you restart your app
npm i -S react-native-xlogrun react-native link react-native-xlog to link the library.
if
Header Search Pathsdoes not have the$(SRCROOT)/../node_modules/react-native/React+recursive, linking may fail.
dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
compile "com.tencent.mars:mars-xlog:1.0.4" //<--add here
compile project(":react-native-xlog") //<--add here
}
include ':react-native-xlog'
project(':react-native-xlog').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-xlog/android')
ext {
MARS_XLOG_VERSION_NAME='1.0.4'
MARS_XLOG_VERSION_NAME_SUFFIX = ''
}
...
import com.engsshi.xlog.XLogPackage;
...
public class MainApplication extends Application implements ReactApplication {
...
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
protected boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
return Arrays.asList(
new MainReactPackage(),
new XLogPackage() // <--add here
);
}
};
...
}
...
import android.os.Environment;
import com.engsshi.xlog.XLogModule;
import com.engsshi.xlog.XLogSetting;
...
public class MainApplication extends Application implements ReactApplication {
...
@Override
public void onCreate() {
super.onCreate();
...
final String appName = this.getString(R.string.app_name);
final String logPath = Environment.getExternalStorageDirectory().getAbsolutePath() + '/' + appName + "/log";
XLogSetting xLogSetting = XLogSetting.builder()
.setLevel(XLogSetting.LEVEL_DEBUG)
.setPath(logPath)
.setCacheDir("")
.setAppenderMode(XLogSetting.APPENDER_MODE_ASYNC)
.setNamePrefix(appName)
.setOpenConsoleLog(true)
.build();
XLogModule.init(xLogSetting)
//XLogModule.initWithNativeCrashInclude(xLogSetting, this);
...
}
...
}
public class MainApplication extends Application implements ReactApplication {
...
@Override
public void onCreate() {
// xlog init here ....
...
XLogModule.open(); //optional, for this, you can log before into RNView
...
}
...
}
import Xlog from 'react-native-xlog';
Xlog.verbose('tag', 'log');
Xlog.debug('tag', 'log');
Xlog.info('tag', 'log');
Xlog.warn('tag', 'log');
Xlog.error('tag', 'log');
Xlog.fatal('tag', 'log');
Use this script to decode log file:
python decode_mars_log_file.py ~/Downloads/log/myapp_20170723.xlog
FAQs
Wecha's Xlog framework for react-native
We found that react-native-xlog demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.