Skip to content

Commit d1e6e91

Browse files
committed
update readme
1 parent 97a77a5 commit d1e6e91

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,16 @@ System.loadLibrary("marsxlog");
7272
final String SDCARD = Environment.getExternalStorageDirectory().getAbsolutePath();
7373
final String logPath = SDCARD + "/marssample/log";
7474

75+
// this is necessary, or may cash for SIGBUS
76+
final String cachePath = this.getFilesDir() + "/xlog"
77+
7578
//init xlog
7679
if (BuildConfig.DEBUG) {
77-
Xlog.appenderOpen(Xlog.LEVEL_DEBUG, Xlog.AppednerModeAsync, "", logPath, "MarsSample");
80+
Xlog.appenderOpen(Xlog.LEVEL_DEBUG, Xlog.AppednerModeAsync, cachePath, logPath, "MarsSample");
7881
Xlog.setConsoleLogOpen(true);
7982

8083
} else {
81-
Xlog.appenderOpen(Xlog.LEVEL_INFO, Xlog.AppednerModeAsync, "", logPath, "MarsSample");
84+
Xlog.appenderOpen(Xlog.LEVEL_INFO, Xlog.AppednerModeAsync, cachePath, logPath, "MarsSample");
8285
Xlog.setConsoleLogOpen(false);
8386
}
8487

@@ -359,13 +362,16 @@ System.loadLibrary("marsxlog");
359362
final String SDCARD = Environment.getExternalStorageDirectory().getAbsolutePath();
360363
final String logPath = SDCARD + "/marssample/log";
361364

365+
// this is necessary, or may cash for SIGBUS
366+
final String cachePath = this.getFilesDir() + "/xlog"
367+
362368
//init xlog
363369
if (BuildConfig.DEBUG) {
364-
Xlog.appenderOpen(Xlog.LEVEL_DEBUG, Xlog.AppednerModeAsync, "", logPath, "MarsSample");
370+
Xlog.appenderOpen(Xlog.LEVEL_DEBUG, Xlog.AppednerModeAsync, cachePath, logPath, "MarsSample");
365371
Xlog.setConsoleLogOpen(true);
366372

367373
} else {
368-
Xlog.appenderOpen(Xlog.LEVEL_INFO, Xlog.AppednerModeAsync, "", logPath, "MarsSample");
374+
Xlog.appenderOpen(Xlog.LEVEL_INFO, Xlog.AppednerModeAsync, cachePath, logPath, "MarsSample");
369375
Xlog.setConsoleLogOpen(false);
370376
}
371377

0 commit comments

Comments
 (0)