diff --git a/Example/Logan-Android/gradle.properties b/Example/Logan-Android/gradle.properties index f3313664..f54044ca 100644 --- a/Example/Logan-Android/gradle.properties +++ b/Example/Logan-Android/gradle.properties @@ -17,4 +17,4 @@ org.gradle.jvmargs=-Xmx1536m # org.gradle.parallel=true groupId=com.dianping.android.sdk artifactId=logan -versionCode=1.1.0 \ No newline at end of file +versionCode=1.2.1 \ No newline at end of file diff --git a/README-zh.md b/README-zh.md index 689d5b47..a8b16973 100644 --- a/README-zh.md +++ b/README-zh.md @@ -24,7 +24,7 @@ Logan是美团点评集团移动端基础日志组件。名称是Log和An的组 在项目的`build.gradle`文件中添加: ```groovy -compile 'com.dianping.android.sdk:logan:1.1.0' +compile 'com.dianping.android.sdk:logan:1.2.1' ``` ### Usage @@ -77,10 +77,17 @@ public class RealSendLogRunnable extends SendLogRunnable { @Override public void sendLog(File logFile) { // logFile为预处理过后即将要上传的日志文件 + // 在此方法最后必须调用finish方法 + finish(); + if (logFile.getName().contains(".copy")) { + logFile.delete(); + } } } ``` +**注意:在sendLog方法的最后必须调用finish方法**。如上面代码所示。 + 最后需要调用Logan的send方法: ```java diff --git a/README.md b/README.md index 80b32e94..c0c8bdda 100644 --- a/README.md +++ b/README.md @@ -24,12 +24,12 @@ If you want to build the source, make sure your NDK version is not higher than * Add the following content in the project `build.gradle` file: ```groovy -compile 'com.dianping.android.sdk:logan:1.1.0' +compile 'com.dianping.android.sdk:logan:1.2.1' ``` ### Usage -You must init Logan before you use it. For example: +**You must init Logan before you use it**. For example: ```java LoganConfig config = new LoganConfig.Builder() @@ -78,10 +78,17 @@ public class RealSendLogRunnable extends SendLogRunnable { @Override public void sendLog(File logFile) { // logFile: After the pretreatment is going to upload the log file + // Must Call finish after send log + finish(); + if (logFile.getName().contains(".copy")) { + logFile.delete(); + } } } ``` +**NOTE: You must call finish method after send log**. As written in the code above + Finally you need to call Logan.s method: ```java